mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-20 04:54:08 +00:00
12 lines
232 B
JavaScript
12 lines
232 B
JavaScript
import store from '~/store'
|
|
|
|
export default async (to, from, next) => {
|
|
if (!store.getters['auth/check'] && store.getters['auth/token']) {
|
|
try {
|
|
await store.dispatch('auth/fetchUser')
|
|
} catch (e) { }
|
|
}
|
|
|
|
next()
|
|
}
|