From bfc2f377ccd487174bdddf39cef9ab356ac8def6 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Fri, 15 Dec 2023 11:53:21 +0100 Subject: [PATCH] fix pb api --- .../server/api/controllers/ScoreboardController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptide_project/server/api/controllers/ScoreboardController.js b/cryptide_project/server/api/controllers/ScoreboardController.js index aa4a7b9..8544e6e 100644 --- a/cryptide_project/server/api/controllers/ScoreboardController.js +++ b/cryptide_project/server/api/controllers/ScoreboardController.js @@ -20,7 +20,7 @@ class SessionController { const [dailyMastermindStats, fields] = await db.getDailyMastermindStats(); console.log(dailyMastermindStats) - res.status(200).json({ tab : dailyMastermindStats }); + res.status(200).json({ tab : [dailyMastermindStats] }); } catch(error){ console.error(error); @@ -122,7 +122,7 @@ class SessionController { const [weeklyMastermindStats, fields] = await db.getWeeklyMastermindStats(); console.log(weeklyMastermindStats) - res.status(200).json({ tab : weeklyMastermindStats }); + res.status(200).json({ tab : [weeklyMastermindStats] }); } catch(error){ console.error(error);