mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: 支持修改tags & workspace: upgrade to js-yaml@4
This commit is contained in:
1 parent
87a4bc8bfa
commit
3d9acf2c1a
18 files changed
+38
-36
No files matched your search
@@ -363,7 +363,7 @@ export class ProblemSettingsHandler extends ProblemManageHandler {
|
||||
['problem_settings', null],
|
||||
];
|
||||
if (this.response.body.pdoc.config) {
|
||||
this.response.body.pdoc.config = yaml.safeDump(this.response.body.pdoc.config);
|
||||
this.response.body.pdoc.config = yaml.dump(this.response.body.pdoc.config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ export class ProblemSettingsHandler extends ProblemManageHandler {
|
||||
async postConfig(domainId: string, pid: string | number, cfg: string) {
|
||||
const pdoc = await problem.get(domainId, pid);
|
||||
// TODO validate
|
||||
const config = yaml.safeLoad(cfg) as any;
|
||||
const config = yaml.load(cfg) as any;
|
||||
await problem.edit(domainId, pdoc.docId, { config });
|
||||
this.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user