mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix additional_file indexing
This commit is contained in:
1 parent
fbfd979bf7
commit
b2dc46f108
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.20.51",
|
"version": "2.20.52",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export async function run({ domainId }, report: Function) {
|
|||||||
report({ message: `${pdoc.domainId}/${pdoc.docId}` });
|
report({ message: `${pdoc.domainId}/${pdoc.docId}` });
|
||||||
const [data, additional_file] = await Promise.all([
|
const [data, additional_file] = await Promise.all([
|
||||||
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/testdata/`),
|
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/testdata/`),
|
||||||
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/additional_files/`),
|
storage.list(`problem/${pdoc.domainId}/${pdoc.docId}/additional_file/`),
|
||||||
]) as any;
|
]) as any;
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
data[i]._id = data[i].name;
|
data[i]._id = data[i].name;
|
||||||
|
|||||||
Reference in new issue
Block a user