Use await with functions that return a promise

This commit is contained in:
mrrfv
2023-09-10 12:27:58 +02:00
parent 9299d69694
commit 025d705efa
+2 -2
View File
@@ -112,9 +112,9 @@ fs.readFile('input.csv', 'utf8', async (err, data) => {
if (DRY_RUN) return console.log('Dry run complete - no lists were created. If this was not intended, please remove the DRY_RUN environment variable and try again.'); if (DRY_RUN) return console.log('Dry run complete - no lists were created. If this was not intended, please remove the DRY_RUN environment variable and try again.');
if (FAST_MODE) { if (FAST_MODE) {
createZeroTrustListsAtOnce(domains); await createZeroTrustListsAtOnce(domains);
return; return;
} }
createZeroTrustListsOneByOne(domains); await createZeroTrustListsOneByOne(domains);
}); });