Merge branch 'master' into remove-union

This commit is contained in:
undefined committed 2024-10-18 06:16:19 +08:00
commit baeafe7cd3
17 files changed
+107 -74

No files matched your search

+6 -12
View File
@@ -186,18 +186,6 @@ export class ProblemMainHandler extends Handler {
}
}
@param('pid', Types.UnsignedInt)
async postStar(domainId: string, pid: number) {
await problem.setStar(domainId, pid, this.user._id, true);
this.back({ star: true });
}
@param('pid', Types.UnsignedInt)
async postUnstar(domainId: string, pid: number) {
await problem.setStar(domainId, pid, this.user._id, false);
this.back({ star: false });
}
@param('pids', Types.NumericArray)
@param('target', Types.String)
async postCopy(domainId: string, pids: number[], target: string) {
@@ -438,6 +426,12 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
await problem.del(this.pdoc.domainId, this.pdoc.docId);
this.response.redirect = this.url('problem_main');
}
@param('star', Types.Boolean)
async postStar(domainId: string, star: boolean) {
await problem.setStar(domainId, this.pdoc.docId, this.user._id, star);
this.back({ star });
}
}
export class ProblemSubmitHandler extends ProblemDetailHandler {