From ba4d76959144cc5fdb46245d7a127d9408731859 Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 14 Sep 2025 16:23:34 +0300 Subject: [PATCH] routes --- src/services/apiClient.js | 2 +- src/stores/authStore.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/apiClient.js b/src/services/apiClient.js index c0da736..54fb8b8 100644 --- a/src/services/apiClient.js +++ b/src/services/apiClient.js @@ -29,7 +29,7 @@ async function refreshAccessToken() { if (isRefreshing) return refreshPromise; isRefreshing = true; - refreshPromise = fetch(`${BASE_URL}/auth/refresh`, { + refreshPromise = fetch(`${BASE_URL}/user/auth/refresh`, { method: 'POST', credentials: 'include', }) diff --git a/src/stores/authStore.js b/src/stores/authStore.js index 83c7efc..264431a 100644 --- a/src/stores/authStore.js +++ b/src/stores/authStore.js @@ -23,7 +23,7 @@ export const useAuthStore = defineStore('auth', () => { const login = async (email, password) => { try { - const response = await apiClient.post('/auth/login', { email, password }) + const response = await apiClient.post('/user/auth/login', { email, password }) const { access_token, user: userData } = response setToken(access_token) @@ -39,7 +39,7 @@ export const useAuthStore = defineStore('auth', () => { setToken(null) user.value = null try { - await apiClient.post('/auth/logout') + await apiClient.post('/user/auth/logout') } catch (error) { console.error('Logout error:', error) }