more logging

This commit is contained in:
Jack 2021-09-09 17:47:49 +01:00
parent a966aa3431
commit a9b20e6404

View file

@ -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,