-Subproject commit 5c1897ea8127c73f6e063c2267214089719da194
+Subproject commit 03f3aba699def4fdfc3926674e469aef37e444d9
const config = JSON.parse(fs.readFileSync('scriptConfig.json', 'utf8'));
// Mongo Connection and Query
-if (config?.mongoConnectionString) {
+if (config && config.mongoConnectionString) {
MongoClient.connect(config.mongoConnectionString, {
useUnifiedTopology: true,
useNewUrlParser: true
}, async function(err, client) {
- const db = client.db('evse');
+ const db = client.db();
for await (const tenantID of config.tenantIDs) {
const response = await db.collection(tenantID + '.chargingstations').deleteMany(
const config = JSON.parse(fs.readFileSync('scriptConfig.json', 'utf8'));
// Mongo Connection and Query
-if (config?.mongoConnectionString) {
+if (config && config.mongoConnectionString) {
MongoClient.connect(config.mongoConnectionString, {
useUnifiedTopology: true,
useNewUrlParser: true
}, async function(err, client) {
- const db = client.db('evse');
+ const db = client.db();
for await (const tenantID of config.tenantIDs) {
const response = await db.collection(tenantID + '.chargingstations').updateMany(