Skip to content

Commit

Permalink
Fixed: Resolves missing Scrapers list on new install
Browse files Browse the repository at this point in the history
  • Loading branch information
towfiqi committed Nov 4, 2023
1 parent 7ab435e commit 4620f11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pages/api/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ export const getAppSettings = async () : Promise<SettingsType> => {
smtp_password: '',
scrape_retry: false,
};
const otherSettings = {
available_scapers: allScrapers.map((scraper) => ({ label: scraper.name, value: scraper.id })),
failed_queue: [],
};
await writeFile(`${process.cwd()}/data/settings.json`, JSON.stringify(settings), { encoding: 'utf-8' });
return settings;
await writeFile(`${process.cwd()}/data/failed_queue.json`, JSON.stringify([]), { encoding: 'utf-8' });
return { ...settings, ...otherSettings };
}
};

0 comments on commit 4620f11

Please sign in to comment.