judge: use addProgress instead of progress

This commit is contained in:
undefined committed 2022-02-10 13:11:05 +08:00
1 parent 5182031bca
commit 8810ccd285
12 files changed
+20 -16

No files matched your search

+1 -1
View File
@@ -71,7 +71,7 @@ export async function next(body: JudgeResultBody) {
if (body.time !== undefined) $set.time = body.time;
if (body.memory !== undefined) $set.memory = body.memory;
if (body.progress !== undefined) $set.progress = body.progress;
rdoc = await record.update(rdoc.domainId, body.rid, $set, $push);
rdoc = await record.update(rdoc.domainId, body.rid, $set, $push, {}, body.addProgress ? { progress: body.progress } : {});
bus.broadcast('record/change', rdoc!, $set, $push);
}