9 lines
246 B
JavaScript
Executable File
9 lines
246 B
JavaScript
Executable File
import { getToken } from "~/utils/auth"
|
|
|
|
export default function (context) {
|
|
if (process.client && !getToken()) {
|
|
context.redirect(302, {path: `/auth/login?redirect=${encodeURIComponent(context.route.fullPath)}`})
|
|
return;
|
|
}
|
|
}
|