mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
workspace: upgrade deps
This commit is contained in:
1 parent
1c3dc161b6
commit
8cffe19609
17 files changed
+110
-98
No files matched your search
@@ -1,9 +1,8 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import decodeHTML from 'decode-html';
|
||||
import { filter } from 'lodash';
|
||||
import xml2js from 'xml2js';
|
||||
import {
|
||||
AdmZip, buildContent, ContentNode, Context, FileTooLargeError, fs,
|
||||
_, AdmZip, buildContent, ContentNode, Context, FileTooLargeError, fs,
|
||||
Handler, PERM, ProblemConfigFile, ProblemModel, SolutionModel, ValidationError,
|
||||
} from 'hydrooj';
|
||||
|
||||
@@ -59,7 +58,7 @@ class FpsProblemImportHandler extends Handler {
|
||||
memory: p.memory_limit[0]._ + p.memory_limit[0].$.unit,
|
||||
};
|
||||
const title = decodeHTML(p.title.join(' '));
|
||||
const tags = filter(p.source, (i: string) => i.trim());
|
||||
const tags = _.filter(p.source, (i: string) => i.trim());
|
||||
const pid = await ProblemModel.add(domainId, null, title, buildContent(content, 'html'), this.user._id, tags);
|
||||
await ProblemModel.addTestdata(domainId, pid, 'config.yaml', Buffer.from(`time: ${config.time}\nmemory: ${config.memory}`));
|
||||
if (p.test_output) {
|
||||
|
||||
Reference in new issue
Block a user