Files
Jack Goh b622d81d94 added prevent user from book if amount is empty
fixed some variable duplication
added getcalculationvalue function
2018-06-13 18:27:36 +08:00

12 lines
258 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/user'].role == 'admin') {
next({ name: 'admin.home' })
} else {
next()
}
}