mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-12 07:42:40 +10: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 };
|
|
});
|