mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 22:35:40 +00:00
Delete expired invites
This commit is contained in:
@@ -40,6 +40,12 @@ router.get(
|
||||
relations: PublicInviteRelation,
|
||||
});
|
||||
|
||||
await invites
|
||||
.filter((i) => i.isExpired())
|
||||
.forEachAsync(async (i) => {
|
||||
await Invite.delete({ code: i.code });
|
||||
});
|
||||
|
||||
return res.json(invites);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user