fix: set token before making auth verify request

This commit is contained in:
Hiro
2026-03-28 12:22:37 +00:00
parent 461a17bc45
commit 98e9eb3fb4

View File

@@ -53,8 +53,8 @@ class ApiClient {
// Auth // Auth
async login(token) { async login(token) {
try { try {
this.setToken(token); // Set token BEFORE making request
const data = await this.get('/auth/verify'); const data = await this.get('/auth/verify');
this.setToken(token);
return data; return data;
} catch (e) { } catch (e) {
this.setToken(null); this.setToken(null);