mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
11 lines
243 B
JavaScript
11 lines
243 B
JavaScript
|
export default function ({ store, redirect, error }) {
|
||
|
// If user not connected, redirect to /
|
||
|
if (!store.state.authUser) {
|
||
|
// return redirect('/')
|
||
|
error({
|
||
|
message: 'You are not connected',
|
||
|
statusCode: 403
|
||
|
})
|
||
|
}
|
||
|
}
|