6 lines
165 B
TypeScript
6 lines
165 B
TypeScript
export default defineNuxtRouteMiddleware((to, from) => {
|
|
if (!getToken()) {
|
|
useLogin().setLoginBack(to)
|
|
return navigateTo('/auth/login')
|
|
}
|
|
}) |