diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 909d5e7..e70cb1f 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -58,7 +58,7 @@ jobs: try { response = await fetch(url); } catch (e) { console.error('Failed to fetch from ' + slug + ': ' + e.message); break; } - for (const script of response.scripts) { + for (const script of response.data) { // Write script file using JSON.stringify (matches Postgres jsonb::text format) const content = JSON.stringify(script.raw_json); fs.writeFileSync(path.join('scripts', script.hash + '.json'), content); diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0e6625..682d158 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ GET /api/export-scripts?cursor={id}&limit=100 Response: { - "scripts": [ + "data": [ { "hash": "md5-of-raw-json", "raw_json": [...],