mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-17 17:11:06 +02:00
Replace the notify store with 2fauth/ui notifier & 2fauth/stores parser
This commit is contained in:
8
resources/js/router/index.js
vendored
8
resources/js/router/index.js
vendored
@ -3,7 +3,8 @@ import middlewarePipeline from "@/router/middlewarePipeline";
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { useTwofaccounts } from '@/stores/twofaccounts'
|
||||
import { useAppSettingsStore } from '@/stores/appSettings'
|
||||
import { useNotifyStore } from '@/stores/notify'
|
||||
import { useNotify } from '@2fauth/ui'
|
||||
import { useErrorHandler } from '@2fauth/stores'
|
||||
|
||||
import authGuard from './middlewares/authGuard'
|
||||
import adminOnly from './middlewares/adminOnly'
|
||||
@ -62,8 +63,9 @@ router.beforeEach((to, from, next) => {
|
||||
const user = useUserStore()
|
||||
const twofaccounts = useTwofaccounts()
|
||||
const appSettings = useAppSettingsStore()
|
||||
const notify = useNotifyStore()
|
||||
const stores = { user: user, twofaccounts: twofaccounts, appSettings: appSettings, notify: notify }
|
||||
const notify = useNotify()
|
||||
const errorHandler = useErrorHandler()
|
||||
const stores = { user: user, twofaccounts: twofaccounts, appSettings: appSettings, notify: notify, errorHandler: errorHandler }
|
||||
const nextMiddleware = {}
|
||||
const context = { to, from, next, nextMiddleware, stores }
|
||||
|
||||
|
Reference in New Issue
Block a user