From 98e9eb3fb4b2c9de72116c0697ba1c05fb266408 Mon Sep 17 00:00:00 2001 From: Hiro Date: Sat, 28 Mar 2026 12:22:37 +0000 Subject: [PATCH] fix: set token before making auth verify request --- public/js/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/api.js b/public/js/api.js index 43c6fb6..e7148d8 100644 --- a/public/js/api.js +++ b/public/js/api.js @@ -53,8 +53,8 @@ class ApiClient { // Auth async login(token) { try { + this.setToken(token); // Set token BEFORE making request const data = await this.get('/auth/verify'); - this.setToken(token); return data; } catch (e) { this.setToken(null);