diff --git a/app/utils/api.js b/app/utils/api.js index 2592365..e6c3fbb 100644 --- a/app/utils/api.js +++ b/app/utils/api.js @@ -268,13 +268,13 @@ export async function sendPhoneOTP() { export async function verifyEmail(code) { console.log('[Auth] Verifying email with code:', code); - const token = typeof window !== 'undefined' ? localStorage.getItem('token') : null; + const token = AuthService.getToken(); return authFetch(`/Auth/VerifyEmail?code=${encodeURIComponent(code)}`, {}, token); } export async function verifyPhone(code) { console.log('[Auth] Verifying phone with code:', code); - const token = typeof window !== 'undefined' ? localStorage.getItem('token') : null; + const token = AuthService.getToken(); return authFetch(`/Auth/VerifyPhoneNumber?code=${encodeURIComponent(code)}`, {}, token); }