mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
feat(invitations): completed admin UI, with minor changes to backend
This commit is contained in:
@ -4,6 +4,8 @@ export default defineEventHandler(async (h3) => {
|
||||
const user = await h3.context.session.getAdminUser(h3);
|
||||
if (!user) throw createError({ statusCode: 403 });
|
||||
|
||||
await runTask("cleanup:invitations");
|
||||
|
||||
const invitations = await prisma.invitation.findMany({});
|
||||
return invitations;
|
||||
});
|
||||
|
||||
@ -9,6 +9,8 @@ export default defineEventHandler(async (h3) => {
|
||||
statusMessage: "id required in fetching invitation",
|
||||
});
|
||||
|
||||
await runTask("cleanup:invitations");
|
||||
|
||||
const invitation = await prisma.invitation.findUnique({ where: { id: id } });
|
||||
if (!invitation)
|
||||
throw createError({
|
||||
|
||||
Reference in New Issue
Block a user