From af4a532a1e1b25f85b240afc4edb244d9dd3ef5f Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Thu, 21 Jan 2021 19:26:29 +0100 Subject: [PATCH] Increment game stat counter also for rematch live games --- client/src/views/Game.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 1eef3346..c2b27043 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -1064,8 +1064,15 @@ export default { // Also to MyGames page: this.notifyMyGames("newgame", gameInfo); }; - if (this.game.type == "live") + if (this.game.type == "live") { + // Increment game stats counter in DB + ajax( + "/gamestat", + "POST", + { data: { vid: gameInfo.vid } } + ); this.addAndGotoLiveGame(gameInfo, notifyNewGame); + } else { // corr game ajax( -- 2.44.0