From 68ed3cad0947866dcc85f89f95e5dc120fdccf46 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Fri, 7 Apr 2023 09:59:55 -0400 Subject: [PATCH] Update sys_stats.js --- backend/sys_stats.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/backend/sys_stats.js b/backend/sys_stats.js index 37c40c3..5710617 100644 --- a/backend/sys_stats.js +++ b/backend/sys_stats.js @@ -62,13 +62,7 @@ function updateActiveSystems() { exports.initStats = function() { // get the System Stats collection - - db.get().collection("system_stats").exists(function(err, result) { - if (result) { - - - - + db.get().createCollection("system_stats") db.get().collection('system_stats', function(err, statsCollection) { var cursor = statsCollection.find(); @@ -102,17 +96,6 @@ exports.initStats = function() { } }); }); - } else { - db.get().createCollection("system_stats", function(err, res) { - if (err) { - console.log("Error creating system_stats collection"); - console.log(err); - } else { - console.log('system_stats created!'); - } - }); - } - }); } // keeps track of the number of calls that get uploaded with an audio file