diff options
Diffstat (limited to 'src/lib/token.ts')
-rw-r--r-- | src/lib/token.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/token.ts b/src/lib/token.ts index 68765d7..a92d242 100644 --- a/src/lib/token.ts +++ b/src/lib/token.ts @@ -27,7 +27,7 @@ export default class Token { sessionStorage.removeItem("refresh"); } - refresh() { + async refresh() { const options = { headers: { Authorization: `Bearer ${this.getRefresh()}` @@ -35,7 +35,7 @@ export default class Token { } try { - const response = axios.post('/refresh_tokens', null, options); + const response = await axios.post('http://localhost:3000/api/refresh_tokens', null, options); this.setRefresh(response.data.refresh); this.set(response.data.token); |