This commit is contained in:
nquidox 2025-09-14 16:23:34 +03:00
parent 6ccdd0a003
commit ba4d769591
2 changed files with 3 additions and 3 deletions

View file

@ -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',
})

View file

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