cek login

This commit is contained in:
='fauz 2025-10-30 15:07:47 +07:00
parent fbc207f75f
commit e3f9fc6789
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,8 @@ export const useAuthStore = defineStore('auth', {
user: null
}),
getters: {
isLoggedIn: (state) => !!state.token && !!state.user,
isLoggedIn: (state) => !!state.token,
// isLoggedIn: (state) => !!state.token && !!state.user,
},
actions: {
async register(username, password, re_password) {

View File

@ -13,7 +13,6 @@ const api = axios.create({
api.interceptors.request.use(
config =>{
const token = localStorage.getItem('token')
console.log(token)
if(token){
config.headers.Authorization = `Bearer ${token}`
}