mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-22 14:49:40 +02:00
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
7 lines
201 B
TypeScript
7 lines
201 B
TypeScript
export default defineNuxtRouteMiddleware(() => {
|
|
const { user } = useMealieAuth();
|
|
// If the user is not an admin redirect to the home page
|
|
if (!user.value?.admin) {
|
|
navigateTo("/");
|
|
}
|
|
});
|