1 parent
b9c5f64989
commit
696166d68a
1 file changed
+3
-2
@@ -1,3 +1,6 @@
|
||||
import router from '@/router'
|
||||
import { authClient } from '@/lib/auth-client.ts'
|
||||
|
||||
interface ApiEnvelope<T> {
|
||||
data: T | null
|
||||
code: number
|
||||
@@ -5,8 +8,6 @@ interface ApiEnvelope<T> {
|
||||
}
|
||||
|
||||
async function redirectToSignIn() {
|
||||
// Imported lazily: the router pulls in views that depend on this module
|
||||
const [{ default: router }, { authClient }] = await Promise.all([import('@/router'), import('@/lib/auth-client.ts')])
|
||||
// Refetch so useSession() consumers drop the stale user
|
||||
authClient.$store.notify('$sessionSignal')
|
||||
|
||||
|
||||
Reference in new issue
Block a user