Skip to content

Commit

Permalink
minor bulk-import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
icaraps committed Sep 8, 2023
1 parent a0c081a commit ebf5903
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/bulk-import.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ export default async function bulkImport({ fetch, name, offset, limit }) {
const reqIndex = await fetch(`${origin}/${name}-query-index.json?sheet=latest&offset=${offset}&limit=${limit}`);

if (!reqIndex.ok) {
console.log(`${reqIndex.status}: ${reqIndex.text()}`);
console.log(`${reqIndex.status}: ${await reqIndex.text()}`);
return;
}

const { data } = reqIndex.json();
const { data } = await reqIndex.json();
for (const { path } of data) {
// eslint-disable-next-line no-await-in-loop
const reqImport = await fetch(`${origin}/webhook`, {
Expand All @@ -19,7 +19,7 @@ export default async function bulkImport({ fetch, name, offset, limit }) {
});

if (!reqImport.ok) {
console.log(`${reqImport.status}: ${reqImport.text()}`);
console.log(`${reqImport.status}: ${await reqImport.text()}`);
break;
}

Expand Down

0 comments on commit ebf5903

Please sign in to comment.