summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client/src/views/CreateSmiles.vue2
-rw-r--r--client/src/views/GetSmile.vue2
-rw-r--r--client/src/views/ManageSmiles.vue4
-rw-r--r--server/service.raku7
4 files changed, 10 insertions, 5 deletions
diff --git a/client/src/views/CreateSmiles.vue b/client/src/views/CreateSmiles.vue
index 88da1f4..ddcdd3a 100644
--- a/client/src/views/CreateSmiles.vue
+++ b/client/src/views/CreateSmiles.vue
@@ -104,7 +104,7 @@ export default {
             const toast = this.$toast;
 
             this.showProgress = true;
-            fetch('http://localhost:9090/create', {
+            fetch('./create', {
                 method: 'POST',
                 cache: 'no-cache',
                 headers: { 'Content-Type': 'application/json' },
diff --git a/client/src/views/GetSmile.vue b/client/src/views/GetSmile.vue
index 8d565ec..9db405a 100644
--- a/client/src/views/GetSmile.vue
+++ b/client/src/views/GetSmile.vue
@@ -41,7 +41,7 @@ export default {
 
             this.showLoading = true;
             fetch(
-                `http://localhost:9090/smile/${this.id}`,
+                `../smile/${this.id}`,
                 { cache: 'no-cache', referrerPolicy: 'no-referrer', responseType: 'blob' }
             ).then(response => {
                 if (response.status === 404)
diff --git a/client/src/views/ManageSmiles.vue b/client/src/views/ManageSmiles.vue
index 370b908..70c9e6b 100644
--- a/client/src/views/ManageSmiles.vue
+++ b/client/src/views/ManageSmiles.vue
@@ -26,7 +26,7 @@
       </div>
       <div class="col-12 md:col-6">
         <FileUpload @error="onError" @before-send="beforeSend" @upload="onUpload"
-                    name="images" url="http://localhost:9090/upload"
+                    name="images" url="../../upload"
                     :multiple="true" accept="image/*"
                     :maxFileSize="2097152"> <!-- 1024 * 1024 * 2 -->
           <template #empty>
@@ -102,7 +102,7 @@ export default {
             const toast = this.$toast;
 
             this.showLoading = true;
-            fetch('http://localhost:9090/verify', {
+            fetch('../../verify', {
                 method: 'POST',
                 cache: 'no-cache',
                 headers: { 'Content-Type': 'application/json' },
diff --git a/server/service.raku b/server/service.raku
index 1ccbb85..f209a67 100644
--- a/server/service.raku
+++ b/server/service.raku
@@ -91,7 +91,6 @@ my $application = route {
 
         my $img;
         if "$user-store/images".IO.d {
-            put "huh";
             my @imgs = dir("$user-store/images").grep(*.f);
             if @imgs.elems {
                 $img = @imgs.pick(1).first;
@@ -111,10 +110,16 @@ my $application = route {
     }
 
     # Serving static assets.
+
+    # Quick fix for an issue.
     get -> 'js', *@path { static 'dist/js', @path; }
     get -> 'css', *@path { static 'dist/css', @path; }
     get -> 'img', *@path { static 'dist/img', @path; }
     get -> 'fonts', *@path { static 'dist/fonts', @path; }
+    get -> $x, 'js', *@path { static 'dist/js', @path; }
+    get -> $x, 'css', *@path { static 'dist/css', @path; }
+    get -> $x, 'img', *@path { static 'dist/img', @path; }
+    get -> $x, 'fonts', *@path { static 'dist/fonts', @path; }
 
     # Serve the app on all paths, it'll handle the routing.
     get -> *@path {
b7b'>^
a7986f5 ^
28fc9fa ^













76a9181 ^
28fc9fa ^


76a9181 ^

28fc9fa ^

















76a9181 ^
28fc9fa ^




c4b57aa ^


































043a02d ^
c4b57aa ^













043a02d ^
c4b57aa ^




































881a908 ^


ea2646f ^
881a908 ^











ea2646f ^
881a908 ^











ea2646f ^











1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193