mirror of
https://github.com/BillyOutlast/drop.git
synced 2026-02-04 08:41:17 +01:00
7 lines
232 B
TypeScript
7 lines
232 B
TypeScript
export default defineEventHandler(async (h3) => {
|
|
const user = await h3.context.session.getUser(h3);
|
|
if (!user)
|
|
throw createError({ statusCode: 403, statusMessage: "Not authenticated" });
|
|
return { admin: user.admin };
|
|
});
|