mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
12 lines
253 B
JavaScript
12 lines
253 B
JavaScript
import store from '~/store'
|
|
|
|
export default async (to, from, next) => {
|
|
if (!store.getters['auth/check']) {
|
|
next({ name: 'login' })
|
|
} else if (store.getters['auth/role'] == 'admin') {
|
|
next({ name: 'admin.home' })
|
|
} else {
|
|
next()
|
|
}
|
|
}
|