init doctor page
This commit is contained in:
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { Pinia } from 'pinia'
|
||||
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||
|
||||
export default defineNuxtRouteMiddleware((to) => {
|
||||
@@ -5,7 +6,7 @@ export default defineNuxtRouteMiddleware((to) => {
|
||||
|
||||
const { $pinia } = useNuxtApp()
|
||||
if (import.meta.server) {
|
||||
const authStore = useUserStore($pinia)
|
||||
const authStore = useUserStore($pinia as Pinia)
|
||||
// Check specific page permissions if defined in config
|
||||
const pagePermissions = PAGE_PERMISSIONS[to.path as keyof typeof PAGE_PERMISSIONS]
|
||||
if (pagePermissions) {
|
||||
|
||||
Reference in New Issue
Block a user