Skip to content

Commit be8d80e

Browse files
Merge pull request #442 from andrewharvey/patch-1
Update Full nuxt example in common-patterns.md to fix middleware redirect
2 parents 68f1dac + 78638fc commit be8d80e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/common-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,9 @@ The `feathers` middleware will redirect any user in a non public page to the log
550550
export default function ({ store, redirect, route }) {
551551
const { auth } = store.state
552552
if (auth.publicPages.length > 0 && !auth.publicPages.includes(route.name) && !auth.payload) {
553-
return redirect('login')
553+
return redirect('/login')
554554
} else if (auth.publicPages.length > 0 && auth.publicPages.includes(route.name) && auth.payload) {
555-
return redirect('feed')
555+
return redirect('/feed')
556556
}
557557
}
558558
```

0 commit comments

Comments
 (0)