mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: handle hack rejudge
This commit is contained in:
1 parent
ce8627bce8
commit
f87c320e42
7 files changed
+143
-46
No files matched your search
@@ -62,12 +62,12 @@ class RecordModel {
|
||||
};
|
||||
}
|
||||
|
||||
static async judge(domainId: string, rid: ObjectID, priority = 0, config: ProblemConfigFile = {}) {
|
||||
static async judge(domainId: string, rid: ObjectID, priority = 0, config: ProblemConfigFile = {}, meta: Partial<JudgeMeta> = {}) {
|
||||
const rdoc = await RecordModel.get(domainId, rid);
|
||||
if (!rdoc) return null;
|
||||
let data: FileInfo[] = [];
|
||||
let source = `${domainId}/${rdoc.pid}`;
|
||||
const meta: JudgeMeta = { problemOwner: 1 };
|
||||
meta = { ...meta, problemOwner: 1 };
|
||||
if (rdoc.pid) {
|
||||
let pdoc = await problem.get(rdoc.domainId, rdoc.pid);
|
||||
if (!pdoc) throw new ProblemNotFoundError(rdoc.domainId, rdoc.pid);
|
||||
|
||||
Reference in new issue
Block a user