From a9b20e6404e1d4b16b727c6f758cd9ec3555e0ea Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 9 Sep 2021 17:47:49 +0100 Subject: [PATCH] more logging --- backend/api/controllers/result.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/api/controllers/result.js b/backend/api/controllers/result.js index 8aff8dcd1..3c11d3028 100644 --- a/backend/api/controllers/result.js +++ b/backend/api/controllers/result.js @@ -8,6 +8,7 @@ const { } = require("../../handlers/validation"); const { stdDev, roundTo2 } = require("../../handlers/misc"); const objecthash = require("object-hash"); +const Logger = require("../../handlers/logger"); class ResultController { static async getResults(req, res, next) { @@ -235,6 +236,12 @@ class ResultController { let addedResult = await ResultDAO.addResult(uid, result); + if (isPb) { + Logger.log("result_saved_pb", addedResult.insertedId, uid); + } else { + Logger.log("result_saved_nopb", addedResult.insertedId, uid); + } + return res.status(200).json({ message: "Result saved", isPb,