feat(invitations): completed admin UI, with minor changes to backend

This commit is contained in:
DecDuck
2024-11-07 23:23:49 +11:00
parent c7b675f841
commit 599da0e348
8 changed files with 677 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
import prisma from "~/server/internal/db/database";
export default defineTask({
meta: {
name: "cleanup:invitations",
},
async run({}) {
const now = new Date();
await prisma.invitation.deleteMany({
where: {
expires: {
lt: now,
},
},
});
return { result: true };
},
});