mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: fix testdata zip upload
This commit is contained in:
1 parent
777d648f63
commit
b833efc8c9
4 files changed
+16
-2
No files matched your search
@@ -384,6 +384,7 @@ export class ProblemFilesHandler extends ProblemDetailHandler {
|
||||
const zip = new AdmZip(this.request.files.file.path);
|
||||
const entries = zip.getEntries();
|
||||
for (const entry of entries) {
|
||||
if (!entry.name) continue;
|
||||
if (type === 'testdata') {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await problem.addTestdata(domainId, this.pdoc.docId, entry.name, entry.getData());
|
||||
|
||||
Reference in new issue
Block a user