typings fix

This commit is contained in:
undefined committed 2021-04-10 12:24:19 +08:00
1 parent 765188d321
commit 9ef4e85b4b
4 files changed
+16 -11

No files matched your search

+4 -1
View File
@@ -138,7 +138,10 @@ const scripts: UpgradeScript[] = [
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/testdata/`),
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/additional_file/`),
]);
await problem.edit(pdoc.domainId, pdoc.docId, { data, additional_file });
await problem.edit(
pdoc.domainId, pdoc.docId,
{ data: data.map((d) => ({ ...d, _id: d.name })), additional_file: additional_file.map((d) => ({ ...d, _id: d.name })) },
);
if (!pdoc.config) return;
if (data.map((d) => d.name).includes('config.yaml')) return;
const cfg = yaml.dump(pdoc.config);