添加html支持

This commit is contained in:
undefined committed 2020-09-02 13:32:47 +08:00
1 parent 0b0c34b0c6
commit 3f2d98534f
9 files changed
+73 -20

No files matched your search

+2 -2
View File
@@ -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();
}