From d5005cb4c1aaad6e2bb421db108ac7da22ef8fe1 Mon Sep 17 00:00:00 2001 From: NuttyShrimp Date: Sun, 21 Apr 2024 23:16:29 +0200 Subject: [PATCH] fix(middleware): dumb admin mistake --- middleware/admin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/admin.ts b/middleware/admin.ts index 280457b..4bf6e08 100644 --- a/middleware/admin.ts +++ b/middleware/admin.ts @@ -1,6 +1,6 @@ export default defineNuxtRouteMiddleware((to, from) => { const user = useUser(); - if (user.value?.admin) { + if (!user.value?.admin) { return navigateTo('/', { replace: true }) } })