mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: small enhancements
This commit is contained in:
1 parent
50b838d21d
commit
d7908aaff6
5 files changed
+24
-8
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import decodeHTML from 'decode-html';
|
||||
import xml2js from 'xml2js';
|
||||
import {
|
||||
_, AdmZip, buildContent, ContentNode, Context, FileTooLargeError, fs,
|
||||
_, AdmZip, BadRequestError, buildContent, ContentNode, Context, FileTooLargeError, fs,
|
||||
Handler, PERM, ProblemConfigFile, ProblemModel, SolutionModel, ValidationError,
|
||||
} from 'hydrooj';
|
||||
|
||||
@@ -12,6 +12,7 @@ class FpsProblemImportHandler extends Handler {
|
||||
}
|
||||
|
||||
async run(domainId: string, result: any) {
|
||||
if (!result?.fps) throw new BadRequestError('Selected file is not a valid FPS problemset.');
|
||||
for (const p of result.fps.item) {
|
||||
const content: ContentNode[] = [];
|
||||
if (p.description?.[0]) {
|
||||
|
||||
Reference in new issue
Block a user