From 9f829056d1f3c45a0cea54dbd58d154274e2964b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 18 Nov 2024 13:34:22 +0100 Subject: Clear "result" when rewinding games. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 175a517..f98ff22 100644 --- a/server.js +++ b/server.js @@ -1306,7 +1306,7 @@ const SQL_FINISH_GAME = SQL(` `) const SQL_REWIND_GAME_CLOCK = SQL("update players set clock=1 where game_id=? and clock < 1") -const SQL_REWIND_GAME = SQL("update games set status=1,moves=?,active=?,mtime=datetime() where game_id=?") +const SQL_REWIND_GAME = SQL("update games set status=1,result=null,moves=?,active=?,mtime=datetime() where game_id=?") const SQL_SELECT_REWIND = SQL("select snap_id, state->>'$.active' as active, state->>'$.state' as state from game_snap where game_id=? order by snap_id desc") const SQL_UPDATE_GAME_ACTIVE = SQL("update games set active=?,mtime=datetime(),moves=moves+1 where game_id=?") -- cgit v1.2.3