routes
This commit is contained in:
parent
6ccdd0a003
commit
ba4d769591
2 changed files with 3 additions and 3 deletions
|
|
@ -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',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue