mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 删除题目前检查是否已被比赛使用
This commit is contained in:
1 parent
e4c6cf258d
commit
26ded9d5df
9 files changed
+78
-62
No files matched your search
@@ -444,6 +444,10 @@ export async function get(domainId: string, tid: ObjectID, type: Type | -1 = doc
|
||||
return tdoc;
|
||||
}
|
||||
|
||||
export async function getRelated(domainId: string, pid: number, type: Type = document.TYPE_CONTEST) {
|
||||
return await document.getMulti(domainId, type, { pids: pid }).toArray();
|
||||
}
|
||||
|
||||
export async function updateStatus(
|
||||
domainId: string, tid: ObjectID, uid: number, rid: ObjectID, pid: number,
|
||||
accept = false, score = 0, type: 30 | 60 = document.TYPE_CONTEST,
|
||||
@@ -624,6 +628,7 @@ global.Hydro.model.contest = {
|
||||
edit,
|
||||
del,
|
||||
get,
|
||||
getRelated,
|
||||
updateStatus,
|
||||
getStatus,
|
||||
count,
|
||||
|
||||
Reference in new issue
Block a user