core: fix contest unlock status (#577)

pull/579/head
panda 1 year ago committed by GitHub
parent fc27b795e0
commit 15220f18b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -839,6 +839,7 @@ export async function recalcStatus(domainId: string, tid: ObjectId) {
export async function unlockScoreboard(domainId: string, tid: ObjectId) { export async function unlockScoreboard(domainId: string, tid: ObjectId) {
const tdoc = await document.get(domainId, document.TYPE_CONTEST, tid); const tdoc = await document.get(domainId, document.TYPE_CONTEST, tid);
if (!tdoc.lockAt || tdoc.unlocked) return; if (!tdoc.lockAt || tdoc.unlocked) return;
await recalcStatus(domainId, tid);
await edit(domainId, tid, { unlocked: true }); await edit(domainId, tid, { unlocked: true });
} }

Loading…
Cancel
Save