First Committ

This commit is contained in:
Paolo Arena
2021-08-31 18:09:59 +02:00
commit 1d6c55807c
299 changed files with 55382 additions and 0 deletions

11
src/middleware/auth.ts Executable file
View File

@@ -0,0 +1,11 @@
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
export default function auth({ next, router }: { next: any, router: any }) {
const tok = tools.getItemLS(toolsext.localStorage.token)
if (!tok) {
return router.push({ name: 'login' })
}
return next()
}