core: fix testdata zip upload

This commit is contained in:
undefined committed 2021-03-29 23:02:59 +08:00
1 parent 777d648f63
commit b833efc8c9
4 files changed
+16 -2

No files matched your search

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