refactor: silence sonar
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 30 Aug 2023 16:03:52 +0000 (18:03 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 30 Aug 2023 16:03:52 +0000 (18:03 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/scripts/deleteChargingStations.cjs
src/scripts/setCSPublicFlag.cjs

index 445dbacd38a4c75d67202be23efda86a8156b256..0e8333c3472b0d26d269a4dd25616aa773d4c990 100755 (executable)
@@ -14,7 +14,7 @@ const { MongoClient } = require('mongodb');
 const config = JSON.parse(fs.readFileSync('scriptConfig.json', 'utf8'));
 
 // Mongo Connection and Query
-if (config && config.mongoConnectionString) {
+if (config?.mongoConnectionString) {
   MongoClient.connect(config.mongoConnectionString, async function (err, client) {
     const db = client.db();
 
index 32b59e4a0849e2a5a9de92870b67a8a65989b032..1f412d1b047f91043bde76fb890bc6ee3e8fd477 100755 (executable)
@@ -15,7 +15,7 @@ const { MongoClient } = require('mongodb');
 const config = JSON.parse(fs.readFileSync('scriptConfig.json', 'utf8'));
 
 // Mongo Connection and Query
-if (config && config.mongoConnectionString) {
+if (config?.mongoConnectionString) {
   MongoClient.connect(config.mongoConnectionString, async function (err, client) {
     const db = client.db();