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,