Skip to content

Commit 71db91f

Browse files
authored
Create Repo: send an array instead of an object to API (codesandbox#309)
1 parent 6a815f3 commit 71db91f

File tree

1 file changed

+4
-3
lines changed
  • packages/app/src/app/store/entities/sandboxes/utils/export-to-github

1 file changed

+4
-3
lines changed

packages/app/src/app/store/entities/sandboxes/utils/export-to-github/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@ export default async function deploy(
1919

2020
const contents = await JSZip.loadAsync(zipFile);
2121

22-
const apiData = { sandbox: {} };
22+
const apiData = { sandbox: [] };
2323
const filePaths = Object.keys(contents.files);
2424
for (let i = 0; i < filePaths.length; i += 1) {
2525
const filePath = filePaths[i];
2626
const file = contents.files[filePath];
2727

2828
if (!file.dir) {
29-
apiData.sandbox[filePath] = {
29+
apiData.sandbox.push({
3030
content: await file.async('text'), // eslint-disable-line no-await-in-loop
3131
isBinary: false,
32-
};
32+
path: filePath,
33+
});
3334
}
3435
}
3536

0 commit comments

Comments
 (0)