From f863607efd5ad3de9632656d9bf478641f9d0900 Mon Sep 17 00:00:00 2001 From: Baptiste Marcel Date: Tue, 12 Dec 2023 14:21:55 +0100 Subject: [PATCH] =?UTF-8?q?correctif=20sur=20ordre=20affichage=20des=20vic?= =?UTF-8?q?toires=20et=20=C3=A9galement=20sur=20la=20requ=C3=AAte=20pour?= =?UTF-8?q?=20les=20weeklyOnline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/DB/socialgraph.db | Bin 28672 -> 28672 bytes .../api/controllers/SessionController.js | 6 +++--- .../server/api/services/DatabaseService.js | 4 ++-- cryptide_project/src/Components/NavBar.tsx | 4 ++-- .../src/Components/ScoreBoard.tsx | 2 +- .../src/services/SessionService.tsx | 4 +++- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cryptide_project/DB/socialgraph.db b/cryptide_project/DB/socialgraph.db index 7c467177d0c9b9afa75db2c2423db7c791b51773..115a655e1d69971cebe5d909a835507886bf6188 100644 GIT binary patch delta 425 zcmZp8z}WDBae_4Cl8G|Tj7v5qEa7KX { if (err) { @@ -245,7 +245,7 @@ class DatabaseService { const firstDayOfWeek = new Date(new Date().setDate(new Date().getDate() - currentDay)).toISOString().slice(0, 10); this.client.all( - 'SELECT pseudo, COUNT(*) as wins FROM users INNER JOIN games ON users.idUser = games.idUser WHERE gameType = ? AND SUBSTR(playedDate, 1, 10) BETWEEN ? AND ? AND win = ? ORDER BY wins ASC LIMIT 10', + 'SELECT pseudo, COUNT(*) as wins FROM users INNER JOIN games ON users.idUser = games.idUser WHERE gameType = ? AND SUBSTR(playedDate, 1, 10) BETWEEN ? AND ? AND win = ? GROUP BY users.idUser ORDER BY wins DESC LIMIT 10', "multijoueur", firstDayOfWeek, currentDate, diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 548f34a..5151a22 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -51,9 +51,9 @@ function AppNavbar({changeLocale}) { return ( - + logo - +