Files
boussole-pluss/frontend/middleware/redirect.ts
Nicolas Doby 5d884b1be6 feat: review backend and frontend
- update to the latest version of Java/SpringBoot
- update to the latest version NuxtJS
- add account/password update
- add account creation
- add account password reset
- add bundle to regroup questions and add default questions on user creation
- add bundle creation
2024-07-09 14:37:43 +02:00

15 lines
464 B
TypeScript

// import { Context } from '@nuxt/types'
// export default function (context: Context) {
// context.redirect(301, '/redirect');
// }
// export default function ({ $auth, redirect }) {
// if (process.client) {
// if (!$auth.loggedIn || !$auth.user.role.includes('admin')) {
// redirect('/admin/login')
// }
// }
// }
// https://stackoverflow.com/questions/64433369/how-to-auto-redirect-to-login-after-an-unauthorized-api-request-ex-when-token