This commit is contained in:
Sébastien Chopin 2017-07-08 18:14:40 +02:00
parent 1d77431db0
commit a0c4709777
2 changed files with 2 additions and 4 deletions

View File

@ -1,7 +1,5 @@
export default function ({ store, redirect, error }) {
// If user not connected, redirect to /
export default function ({ store, error }) {
if (!store.state.authUser) {
// return redirect('/')
error({
message: 'You are not connected',
statusCode: 403

View File

@ -1,7 +1,7 @@
<template>
<div>
<h1>Super secret page</h1>
<p>If you try to access this URL not connected, you will be redirected to the home page (server-side or client-side)</p>
<p>If you try to access this URL not connected, you will see the error page telling your that you are not connected.</p>
<nuxt-link to="/">Back to the home page</nuxt-link>
</div>
</template>