Showing
3 changed files
with
47 additions
and
0 deletions
... | @@ -163,6 +163,14 @@ | ... | @@ -163,6 +163,14 @@ |
163 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", | 163 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", |
164 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" | 164 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" |
165 | }, | 165 | }, |
166 | + "axios": { | ||
167 | + "version": "0.19.2", | ||
168 | + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", | ||
169 | + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", | ||
170 | + "requires": { | ||
171 | + "follow-redirects": "1.5.10" | ||
172 | + } | ||
173 | + }, | ||
166 | "balanced-match": { | 174 | "balanced-match": { |
167 | "version": "1.0.0", | 175 | "version": "1.0.0", |
168 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", | 176 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", |
... | @@ -244,6 +252,14 @@ | ... | @@ -244,6 +252,14 @@ |
244 | "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", | 252 | "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", |
245 | "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" | 253 | "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" |
246 | }, | 254 | }, |
255 | + "debug": { | ||
256 | + "version": "3.1.0", | ||
257 | + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", | ||
258 | + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", | ||
259 | + "requires": { | ||
260 | + "ms": "2.0.0" | ||
261 | + } | ||
262 | + }, | ||
247 | "dir-glob": { | 263 | "dir-glob": { |
248 | "version": "3.0.1", | 264 | "version": "3.0.1", |
249 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", | 265 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", |
... | @@ -293,6 +309,14 @@ | ... | @@ -293,6 +309,14 @@ |
293 | "to-regex-range": "^5.0.1" | 309 | "to-regex-range": "^5.0.1" |
294 | } | 310 | } |
295 | }, | 311 | }, |
312 | + "follow-redirects": { | ||
313 | + "version": "1.5.10", | ||
314 | + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", | ||
315 | + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", | ||
316 | + "requires": { | ||
317 | + "debug": "=3.1.0" | ||
318 | + } | ||
319 | + }, | ||
296 | "fs-extra": { | 320 | "fs-extra": { |
297 | "version": "8.1.0", | 321 | "version": "8.1.0", |
298 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", | 322 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", |
... | @@ -525,6 +549,11 @@ | ... | @@ -525,6 +549,11 @@ |
525 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", | 549 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", |
526 | "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" | 550 | "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" |
527 | }, | 551 | }, |
552 | + "ms": { | ||
553 | + "version": "2.0.0", | ||
554 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | ||
555 | + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | ||
556 | + }, | ||
528 | "once": { | 557 | "once": { |
529 | "version": "1.4.0", | 558 | "version": "1.4.0", |
530 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", | 559 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", | ... | ... |
... | @@ -15,6 +15,7 @@ | ... | @@ -15,6 +15,7 @@ |
15 | "svelte": "^3.0.0" | 15 | "svelte": "^3.0.0" |
16 | }, | 16 | }, |
17 | "dependencies": { | 17 | "dependencies": { |
18 | + "axios": "^0.19.2", | ||
18 | "rollup-plugin-copy": "^3.3.0", | 19 | "rollup-plugin-copy": "^3.3.0", |
19 | "sirv-cli": "^0.4.4", | 20 | "sirv-cli": "^0.4.4", |
20 | "svelte-spa-router": "^2.1.0" | 21 | "svelte-spa-router": "^2.1.0" | ... | ... |
... | @@ -2,12 +2,29 @@ | ... | @@ -2,12 +2,29 @@ |
2 | export let params = {}; | 2 | export let params = {}; |
3 | 3 | ||
4 | import {push} from 'svelte-spa-router'; | 4 | import {push} from 'svelte-spa-router'; |
5 | + import axios from 'axios'; | ||
6 | + | ||
7 | + let character = {}; | ||
5 | 8 | ||
6 | function init() { | 9 | function init() { |
10 | + let nickname; | ||
11 | + | ||
7 | if(!params.character) { | 12 | if(!params.character) { |
8 | M.toast({html:"캐릭터명을 입력해주세요."}); | 13 | M.toast({html:"캐릭터명을 입력해주세요."}); |
9 | push("/"); | 14 | push("/"); |
10 | } | 15 | } |
16 | + | ||
17 | + nickname = decodeURI(params.character); | ||
18 | + | ||
19 | + axios.get('/api/character', { | ||
20 | + params:{ | ||
21 | + nickname:nickname | ||
22 | + } | ||
23 | + }).then(function(response) { | ||
24 | + console.log(response); | ||
25 | + }).catch(function(error) { | ||
26 | + console.log(error); | ||
27 | + }); | ||
11 | } | 28 | } |
12 | 29 | ||
13 | init(); | 30 | init(); | ... | ... |
-
Please register or login to post a comment