mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-10 06:55:35 -04:00
chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
8
frontend/app/middleware/advanced-only.ts
Normal file
8
frontend/app/middleware/advanced-only.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export default defineNuxtRouteMiddleware(() => {
|
||||
const { user } = useMealieAuth();
|
||||
// If the user is not allowed to access advanced features redirect to the home page
|
||||
if (!user.value?.advanced) {
|
||||
console.warn("User is not allowed to access advanced features");
|
||||
navigateTo("/");
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user