fix: expire conference repositories before completing expiration

This commit is contained in:
tdurieux
2026-09-06 09:18:42 +02:00
parent 6777537d44
commit 38a09188ad
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -33,10 +33,10 @@ export default class Conference {
* Expire the conference
*/
async expire() {
await this.updateStatus("expired");
await Promise.all(
(await this.repositories()).map(async (conf) => await conf.expire())
);
await this.updateStatus("expired");
}
/**
+1 -1
View File
@@ -56,7 +56,7 @@ router.get("/", async (req: express.Request, res: express.Response) => {
).map(async (data) => {
const conf = new Conference(data);
if (data.endDate < new Date() && data.status == "ready") {
await conf.updateStatus("expired");
await conf.expire();
}
return conf;
})