added validation on every USE_DB_AUTHENTICATION call

This commit is contained in:
rafaelsideguide
2024-08-12 14:20:41 -03:00
parent ba2af74adf
commit bbed6ef23d
11 changed files with 24 additions and 12 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ export async function logScrape(
scrapeLog: ScrapeLog,
pageOptions?: PageOptions
) {
if (process.env.USE_DB_AUTHENTICATION === "false") {
const useDbAuthentication = process.env.USE_DB_AUTHENTICATION === 'true';
if (!useDbAuthentication) {
Logger.debug("Skipping logging scrape to Supabase");
return;
}