mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
* feat: new dropdown-based editor switching * feat: tab based switching * feat: add icon * fix: lint * chore: i18n translations oh boy was this a 'chore'
16 lines
507 B
TypeScript
16 lines
507 B
TypeScript
import aclManager from "~/server/internal/acls";
|
|
import prisma from "~/server/internal/db/database";
|
|
import taskHandler from "~/server/internal/tasks";
|
|
|
|
export default defineEventHandler(async (h3) => {
|
|
const allowed = await aclManager.allowSystemACL(h3, [
|
|
"auth:simple:invitation:read",
|
|
]);
|
|
if (!allowed) throw createError({ statusCode: 403 });
|
|
|
|
await taskHandler.runTaskGroupByName("cleanup:invitations");
|
|
|
|
const invitations = await prisma.invitation.findMany({});
|
|
return invitations;
|
|
});
|