mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
Merge branch 'master' into remove-union
This commit is contained in:
17 files changed
+107
-74
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user