This commit is contained in:
2026-08-04 21:01:39 +08:00
parent 88bd939170
commit 5cb1ca307d
77 changed files with 9914 additions and 131 deletions
+9 -1
View File
@@ -162,7 +162,15 @@ export const useAuthStore = defineStore('admin-auth', () => {
}
async function restoreSession() {
if (isAuthenticated.value) return true
if (isAuthenticated.value) {
if (!refreshToken.value) return true
try {
await refreshSession()
return true
} catch {
return false
}
}
if (!refreshToken.value) return false
try {
await refreshSession()