set token bug fixed

This commit is contained in:
nquidox 2025-09-14 18:22:26 +03:00
parent 8934f7b219
commit 634b44e683

View file

@ -26,8 +26,7 @@ export const useAuthStore = defineStore('auth', () => {
const login = async (email, password) => { const login = async (email, password) => {
try { try {
const response = await apiClient.post('/user/auth/login', { email, password }) const response = await apiClient.post('/user/auth/login', { email, password })
setToken(response.data.accessToken) setToken(response.data.access_token)
router.push({ name: 'collection'}) router.push({ name: 'collection'})
} catch (error) { } catch (error) {
console.error('Login error:', error) console.error('Login error:', error)