mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: allow homework add maintainer (#518)
This commit is contained in:
1 parent
809966fed3
commit
eb634dca69
8 files changed
+30
-16
No files matched your search
@@ -395,7 +395,7 @@ export class ContestEditHandler extends Handler {
|
||||
domainId: string, tid: ObjectID, beginAtDate: string, beginAtTime: string, duration: number,
|
||||
title: string, content: string, rule: string, _pids: string, rated = false,
|
||||
_code = '', autoHide = false, assign: string[] = null, lock: number = null,
|
||||
contestDuration: number = null, maintainer: number[] = null, allowViewCode = false,
|
||||
contestDuration: number = null, maintainer: number[] = [], allowViewCode = false,
|
||||
) {
|
||||
if (autoHide) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
||||
|
||||
@@ -154,12 +154,13 @@ class HomeworkEditHandler extends Handler {
|
||||
@param('content', Types.Content)
|
||||
@param('pids', Types.Content)
|
||||
@param('rated', Types.Boolean)
|
||||
@param('maintainer', Types.NumericArray, true)
|
||||
@param('assign', Types.CommaSeperatedArray, true)
|
||||
async postUpdate(
|
||||
domainId: string, tid: ObjectID, beginAtDate: string, beginAtTime: string,
|
||||
penaltySinceDate: string, penaltySinceTime: string, extensionDays: number,
|
||||
penaltyRules: PenaltyRules, title: string, content: string, _pids: string, rated = false,
|
||||
assign: string[] = [],
|
||||
maintainer: number[] = [], assign: string[] = [],
|
||||
) {
|
||||
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
|
||||
const tdoc = tid ? await contest.get(domainId, tid) : null;
|
||||
@@ -188,6 +189,7 @@ class HomeworkEditHandler extends Handler {
|
||||
penaltySince: penaltySince.toDate(),
|
||||
penaltyRules,
|
||||
rated,
|
||||
maintainer,
|
||||
assign,
|
||||
});
|
||||
if (tdoc.beginAt !== beginAt.toDate()
|
||||
|
||||
Reference in new issue
Block a user