core: fix contest unlock status (#577)

This commit is contained in:
panda authored and GitHub committed 2023-05-14 01:07:19 +08:00
1 parent fc27b795e0
commit 15220f18b7
1 file changed
+1
+1
View File
@@ -839,6 +839,7 @@ export async function recalcStatus(domainId: string, tid: ObjectId) {
export async function unlockScoreboard(domainId: string, tid: ObjectId) {
const tdoc = await document.get(domainId, document.TYPE_CONTEST, tid);
if (!tdoc.lockAt || tdoc.unlocked) return;
await recalcStatus(domainId, tid);
await edit(domainId, tid, { unlocked: true });
}