Merge branch 'master' of github.com:jerome-benoit/charging-stations-simulator
[e-mobility-charging-stations-simulator.git] / src / scripts / deleteChargingStations.js
index 0dbefc07cd9c9286b68dd714e17a25d75b57ef1f..3ebeb0942a1d007a18db7324cc12504088639816 100755 (executable)
@@ -6,7 +6,7 @@ const fs = require('fs');
 // This script deletes charging stations
 // Filter charging stations by id pattern
 
-// Use Case: ev-simulator creates thousands of charging stations, which are not longer needed.
+// Use Case: charging-stations-simulator creates thousands of charging stations, which are not longer needed.
 // Delete these charging stations all at once
 
 // Config
@@ -14,10 +14,7 @@ const config = JSON.parse(fs.readFileSync('scriptConfig.json', 'utf8'));
 
 // Mongo Connection and Query
 if (config && config.mongoConnectionString) {
-  MongoClient.connect(config.mongoConnectionString, {
-    useUnifiedTopology: true,
-    useNewUrlParser: true
-  }, async function(err, client) {
+  MongoClient.connect(config.mongoConnectionString, async function(err, client) {
     const db = client.db();
 
     for await (const tenantID of config.tenantIDs) {