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 }) { export default function ({ store, error }) {
// If user not connected, redirect to /
if (!store.state.authUser) { if (!store.state.authUser) {
// return redirect('/')
error({ error({
message: 'You are not connected', message: 'You are not connected',
statusCode: 403 statusCode: 403

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<h1>Super secret page</h1> <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> <nuxt-link to="/">Back to the home page</nuxt-link>
</div> </div>
</template> </template>