Files
comedy-video-lib/middleware/authenticated.js
Kevin ANATOLE 6945c27ec0 Logged in/ Logged out
- Created midlewares for authenticated and guest]
- Add the token to the api calls
- Added redirect after the login
2020-11-11 20:26:45 +00:00

7 lines
158 B
JavaScript

export default function ({ store, redirect }) {
// If the user is not authenticated
if (!store.state.auth.loggedIn) {
return redirect('/login')
}
}