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
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);