core: fix contest_balloon

pull/685/head
undefined 11 months ago
parent 4add381be1
commit fd4fb18db2

@ -1,6 +1,6 @@
{ {
"name": "hydrooj", "name": "hydrooj",
"version": "4.9.26", "version": "4.9.27",
"bin": "bin/hydrooj.js", "bin": "bin/hydrooj.js",
"main": "src/plugin-api", "main": "src/plugin-api",
"module": "src/plugin-api", "module": "src/plugin-api",

@ -712,7 +712,7 @@ export class ContestBalloonHandler extends ContestManagementBaseHandler {
...todo ? { sent: { $exists: false } } : {}, ...todo ? { sent: { $exists: false } } : {},
...(!this.tdoc.lockAt || this.user.hasPerm(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD)) ...(!this.tdoc.lockAt || this.user.hasPerm(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD))
? {} : { _id: { $lt: this.tdoc.lockAt } }, ? {} : { _id: { $lt: this.tdoc.lockAt } },
}).sort({ _id: -1 }).project({ uid: 1 }).toArray(); }).sort({ _id: -1 }).toArray();
const uids = bdocs.map((i) => i.uid).concat(bdocs.filter((i) => i.sent).map((i) => i.sent)); const uids = bdocs.map((i) => i.uid).concat(bdocs.filter((i) => i.sent).map((i) => i.sent));
this.response.body = { this.response.body = {
tdoc: this.tdoc, tdoc: this.tdoc,

Loading…
Cancel
Save