diff --git a/lib/server/middlewareButNotReally/isAdmin.ts b/lib/server/middlewareButNotReally/isAdmin.ts index a109b0b..0a882c6 100644 --- a/lib/server/middlewareButNotReally/isAdmin.ts +++ b/lib/server/middlewareButNotReally/isAdmin.ts @@ -1,6 +1,8 @@ import { H3Event, EventHandlerRequest } from "h3"; import { messages } from "../constants"; +import isLoggedIn from "./isLoggedIn"; export default function (ev: H3Event) { + isLoggedIn(ev); if (!ev.context.currentUser?.profile.isAdmin) { throw createError({ statusCode: 403,