mirror of
https://github.com/Dan-314/ravenswood-archive-stacks.git
synced 2026-05-18 08:04:04 -05:00
refactor to data
This commit is contained in:
@@ -58,7 +58,7 @@ jobs:
|
|||||||
try { response = await fetch(url); }
|
try { response = await fetch(url); }
|
||||||
catch (e) { console.error('Failed to fetch from ' + slug + ': ' + e.message); break; }
|
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)
|
// Write script file using JSON.stringify (matches Postgres jsonb::text format)
|
||||||
const content = JSON.stringify(script.raw_json);
|
const content = JSON.stringify(script.raw_json);
|
||||||
fs.writeFileSync(path.join('scripts', script.hash + '.json'), content);
|
fs.writeFileSync(path.join('scripts', script.hash + '.json'), content);
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ GET /api/export-scripts?cursor={id}&limit=100
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
{
|
{
|
||||||
"scripts": [
|
"data": [
|
||||||
{
|
{
|
||||||
"hash": "md5-of-raw-json",
|
"hash": "md5-of-raw-json",
|
||||||
"raw_json": [...],
|
"raw_json": [...],
|
||||||
|
|||||||
Reference in New Issue
Block a user