mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: admin can remove contestant before contest start (#1196)
This commit is contained in:
1 parent
52f811cf98
commit
f29971a30d
11 files changed
+50
-3
No files matched your search
@@ -939,6 +939,12 @@ export async function attend(domainId: string, tid: ObjectId, uid: number, paylo
|
||||
return {};
|
||||
}
|
||||
|
||||
export async function cancelAttend(domainId: string, tid: ObjectId, uid: number) {
|
||||
await document.deleteMultiStatus(domainId, document.TYPE_CONTEST, { docId: tid, uid });
|
||||
await document.inc(domainId, document.TYPE_CONTEST, tid, 'attend', -1);
|
||||
return {};
|
||||
}
|
||||
|
||||
export function getMultiStatus(domainId: string, query: any) {
|
||||
return document.getMultiStatus(domainId, document.TYPE_CONTEST, query);
|
||||
}
|
||||
@@ -1148,6 +1154,7 @@ global.Hydro.model.contest = {
|
||||
getListStatus,
|
||||
getMultiStatus,
|
||||
attend,
|
||||
cancelAttend,
|
||||
edit,
|
||||
del,
|
||||
get,
|
||||
|
||||
Reference in new issue
Block a user