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