Skip to content

Commit

Permalink
fix(middleware): dumb admin mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
NuttyShrimp committed Apr 21, 2024
1 parent b1b4e99 commit d5005cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/admin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default defineNuxtRouteMiddleware((to, from) => {
const user = useUser();
if (user.value?.admin) {
if (!user.value?.admin) {
return navigateTo('/', { replace: true })
}
})

0 comments on commit d5005cb

Please sign in to comment.