forked from AkkomaGang/admin-fe
Replace depricated addRoutes with addRoute
This commit is contained in:
parent
2d27962e16
commit
8c9b5d5972
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ export const beforeEachRoute = (to, from, next) => {
|
||||||
store.dispatch('GetUserInfo').then(res => {
|
store.dispatch('GetUserInfo').then(res => {
|
||||||
const roles = res.data.pleroma.is_admin ? ['admin'] : []
|
const roles = res.data.pleroma.is_admin ? ['admin'] : []
|
||||||
store.dispatch('GenerateRoutes', { roles }).then(() => {
|
store.dispatch('GenerateRoutes', { roles }).then(() => {
|
||||||
router.addRoutes(store.getters.addRouters)
|
store.getters.addRouters.forEach(route => router.addRoute(route))
|
||||||
next({ ...to, replace: true })
|
next({ ...to, replace: true })
|
||||||
})
|
})
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
|
Loading…
Reference in a new issue