mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-25 01:13:39 +10:00
feat(invitations): completed admin UI, with minor changes to backend
This commit is contained in:
@@ -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 };
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user