ffplayout/middleware/auth.js
2020-09-10 16:29:19 +02:00

8 lines
175 B
JavaScript

export default async function ({ store, redirect }) {
await store.dispatch('auth/inspectToken')
if (!store.state.auth.isLogin) {
return redirect('/')
}
}