From 3ce216104d1459ba5132cac5df43d8216d474077 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 16 Oct 2023 08:01:44 +0000 Subject: [PATCH 1/5] Update 'src/controllers/userController.js' --- src/controllers/userController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/userController.js b/src/controllers/userController.js index 3a5030f7..013960e8 100644 --- a/src/controllers/userController.js +++ b/src/controllers/userController.js @@ -2,7 +2,7 @@ // logger: true, // }); -const axios = require('axios'); +//const axios = require('axios'); const bcrypt = require("bcrypt"); const saltRounds = 10; const libphonenumberjs = require("libphonenumber-js"); From 81639553d9114af17db1b9d2c53678d8de942d0a Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 16 Oct 2023 08:52:40 +0000 Subject: [PATCH 2/5] Update 'src/index.js' --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index c40a2383..e9df1586 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ const userController = require("./controllers/userController"); const { User,Counter, generateBookingId,resetCounter,generateCustomerId,ProfilePicture} = require('./models/User') -const tanksController = require("./controllers/tanksController"); +//const tanksController = require("./controllers/tanksController"); const tankersController = require("./controllers/tankersController.js"); const createConnectionController = require("./controllers/createConnectionController"); const cors = require("cors"); From 6bb9105cf905e78913047d0bd5cdf287529d402d Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 16 Oct 2023 09:25:16 +0000 Subject: [PATCH 3/5] Update 'src/controllers/tanksController.js' --- src/controllers/tanksController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 26841904..88fb50f6 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1346,7 +1346,7 @@ exports.totalwaterLevelSum = async (request, reply) => { } ]); - const result = waterlevelSum[0]?.totalWaterlevel ?? 0; + const result = waterlevelSum[0]?totalWaterlevel : 0 reply.send({ waterlevelSum: result }); } From 62ed3b917f1595bc92c211b7f0cada21919aebbc Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 16 Oct 2023 09:29:36 +0000 Subject: [PATCH 4/5] Update 'src/config/config.js' --- src/config/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/config.js b/src/config/config.js index 0b1f4ff5..406357d5 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -30,7 +30,7 @@ const defaultDatabase = "arminta-tank-db"; async function dbConnection() { try { - db.connect(databaseURLNew, { user: "armintatankdbuser", pass: "armintatank1" , useUnifiedTopology: true, }); + db.connect(databaseURLNew); // db.connect(databaseURLNew) db.connection.on("connected", function () { console.log( From 1c6a376185bf1a728784bf407ac0f3ffc6a95320 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 16 Oct 2023 09:43:39 +0000 Subject: [PATCH 5/5] Update 'src/config/config.js' --- src/config/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/config.js b/src/config/config.js index 406357d5..5afb90a0 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -30,7 +30,7 @@ const defaultDatabase = "arminta-tank-db"; async function dbConnection() { try { - db.connect(databaseURLNew); + db.connect(databaseURLNew,{ user: "armintatankdbuser", pass: "armintatank1", useUnifiedTopology: true}); // db.connect(databaseURLNew) db.connection.on("connected", function () { console.log(