From 6a8a9d7bbca9b590eda2250d24bfa5196d0623f4 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 7 Sep 2021 15:02:58 +0100 Subject: [PATCH] saving to database if result was a pb --- backend/api/controllers/result.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/api/controllers/result.js b/backend/api/controllers/result.js index 8305cc158..fdd64482b 100644 --- a/backend/api/controllers/result.js +++ b/backend/api/controllers/result.js @@ -195,6 +195,10 @@ class ResultController { const isPb = await UserDAO.checkIfPb(uid, result); const tagPbs = await UserDAO.checkIfTagPb(uid, result); + if (isPb) { + result.isPb = true; + } + if (result.mode === "time" && String(result.mode2) === "60") { UserDAO.incrementBananas(uid, result.wpm); if (isPb && user.discordId) {