set token bug fixed
This commit is contained in:
parent
8934f7b219
commit
634b44e683
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue