Files
drop/server/api/v1/admin/user/token/token.get.ts
2025-03-10 10:34:32 +11:00

10 lines
367 B
TypeScript

import aclManager from "~/server/internal/acls";
import { userACLDescriptions } from "~/server/internal/acls/descriptions";
export default defineEventHandler(async (h3) => {
const userId = await aclManager.getUserIdACL(h3, []); // No ACLs only allows session authentication
if (!userId) throw createError({ statusCode: 403 });
return userACLDescriptions;
});