summaryrefslogtreecommitdiff
path: root/src/lib/token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/token.ts')
-rw-r--r--src/lib/token.ts4
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);