summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-18 13:34:22 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-18 13:34:27 +0100
commit9f829056d1f3c45a0cea54dbd58d154274e2964b (patch)
tree77cb90222a5bc4369b1ae35e58fb57097200ae2d /server.js
parent8019fe4e78a2ce4b03f3b2d2d11458f59a0224ad (diff)
downloadserver-master.tar.gz
Clear "result" when rewinding games.HEADmaster
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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=?")