mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
添加html支持
This commit is contained in:
1 parent
0b0c34b0c6
commit
3f2d98534f
9 files changed
+73
-20
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { isSafeInteger, flatten } from 'lodash';
|
||||
import yaml from 'js-yaml';
|
||||
import yaml, { safeLoad } from 'js-yaml';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import {
|
||||
NoProblemError, ProblemDataNotFoundError, BadRequestError,
|
||||
@@ -360,7 +360,7 @@ 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);
|
||||
const config = yaml.safeLoad(cfg) as any;
|
||||
await problem.edit(domainId, pdoc.docId, { config });
|
||||
this.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user