template into ui

This commit is contained in:
undefined committed 2020-07-31 13:09:08 +08:00
1 parent 43ee86d34b
commit 8bb389eedd
13 files changed
+70 -206

No files matched your search

+3 -2
View File
@@ -6,7 +6,6 @@ import * as problem from './problem';
import {
Rdoc, TestCase, PretestConfig, ContestInfo, ProblemConfig,
} from '../interface';
import { RecordNotFoundError } from '../error';
import * as db from '../service/db';
const coll = db.collection('record');
@@ -48,7 +47,9 @@ export interface JudgeTask {
}
export async function get(domainId: string, _id: ObjectID): Promise<Rdoc | null> {
return await coll.findOne({ domainId, _id });
const res = await coll.findOne({ _id });
if (res && res.domainId === domainId) return res;
return null;
}
export async function judge(domainId: string, rid: ObjectID) {