mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
update
This commit is contained in:
1 parent
8389519249
commit
a5886ecb99
37 files changed
+940
-162
No files matched your search
@@ -118,7 +118,7 @@ class ContestBoardcastHandler extends ContestHandler {
|
||||
const tdoc = await contest.get(domainId, tid);
|
||||
if (tdoc.owner !== this.user._id) throw new PermissionError('Boardcast Message');
|
||||
const tsdocs = await contest.getMultiStatus(domainId, { docId: tid }).toArray();
|
||||
const uids = Array.from(new Set(tsdocs.map((tsdoc) => tsdoc.uid)));
|
||||
const uids: number[] = Array.from(new Set(tsdocs.map((tsdoc) => tsdoc.uid)));
|
||||
await Promise.all(
|
||||
uids.map((uid) => message.send(this.user._id, uid, content, message.FLAG_ALERT)),
|
||||
);
|
||||
@@ -343,7 +343,7 @@ class ContestCodeHandler extends ContestHandler {
|
||||
},
|
||||
}).toArray();
|
||||
for (const rdoc of rdocs) {
|
||||
zip.addFile(`${rnames[rdoc._id]}.${rdoc.lang}`, rdoc.code);
|
||||
zip.addFile(`${rnames[rdoc._id.toHexString()]}.${rdoc.lang}`, Buffer.from(rdoc.code));
|
||||
}
|
||||
await this.binary(zip.toBuffer(), `${tdoc.title}.zip`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user