Fixed MongoDB collection names.

Ylian Saint-Hilaire committed Feb 18, 2019 at 18:29 UTC 223ccedb91841c65a201346fe50222a4313552a5
1 file changed +2 -2
db.js
+2 -2
@@ -60,7 +60,7 @@ module.exports.CreateDB = function (parent) {
60 });
61
62 // Setup MongoDB events collection and indexes
63 - obj.eventsfile = db.collection(dbcollection + '-events'); // Collection containing all events
63 + obj.eventsfile = db.collection('events'); // Collection containing all events
64 obj.eventsfile.getIndexes(function (err, indexes) {
65 // Check if we need to reset indexes
66 var indexesByName = {}, indexCount = 0;
@@ -82,7 +82,7 @@ module.exports.CreateDB = function (parent) {
82 });
83
84 // Setup MongoDB power events collection and indexes
85 - obj.powerfile = db.collection(dbcollection + '-power'); // Collection containing all power events
85 + obj.powerfile = db.collection('power'); // Collection containing all power events
86 obj.powerfile.getIndexes(function (err, indexes) {
87 // Check if we need to reset indexes
88 var indexesByName = {}, indexCount = 0;