diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-18 13:34:22 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-18 13:34:27 +0100 |
commit | 9f829056d1f3c45a0cea54dbd58d154274e2964b (patch) | |
tree | 77cb90222a5bc4369b1ae35e58fb57097200ae2d /server.js | |
parent | 8019fe4e78a2ce4b03f3b2d2d11458f59a0224ad (diff) | |
download | server-master.tar.gz |
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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=?") |