mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
testdata.convert
This commit is contained in:
1 parent
26f780ddee
commit
0d7d6ea12a
15 files changed
+199
-127
No files matched your search
@@ -247,8 +247,15 @@ class ProblemSettingsHandler extends ProblemManageHandler {
|
||||
];
|
||||
}
|
||||
|
||||
async post() {
|
||||
// TODO(masnn)
|
||||
async postConfig({ domainId, pid, yaml }) {
|
||||
await problem.edit(domainId, pid, { config: yaml });
|
||||
this.back();
|
||||
}
|
||||
|
||||
async postSetting({
|
||||
domainId, pid, hidden = false, category, tag,
|
||||
}) {
|
||||
await problem.edit(domainId, pid, { hidden, category, tag });
|
||||
this.back();
|
||||
}
|
||||
}
|
||||
@@ -303,7 +310,7 @@ class ProblemDataDownloadHandler extends ProblemDetailHandler {
|
||||
if (this.user._id !== this.pdoc.owner) this.checkPerm([PERM_READ_PROBLEM_DATA, PERM_JUDGE]);
|
||||
if (!this.pdoc.data) throw new ProblemDataNotFoundError(pid);
|
||||
else if (typeof this.pdoc.data === 'string') [, this.response.redirect] = this.pdoc.data.split('from:');
|
||||
this.response.redirect = file.url(this.pdoc.data, this.pdoc.title);
|
||||
this.response.redirect = await file.url(this.pdoc.data, `${this.pdoc.title}.zip`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user