summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-17 01:15:47 +0200
committerTor Andersson <tor@ccxvii.net>2021-07-17 01:15:55 +0200
commit3fd3139de657545dbb4de24f198f271237405f2f (patch)
tree97b7ea325f8696a35881ddb66f344e9ccf819dcf /server.js
parent3a4ed8893e03870acfbb85c40d7e0b9519822e38 (diff)
downloadserver-3fd3139de657545dbb4de24f198f271237405f2f.tar.gz
Set game modified time when it is started.
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 e5658c9..0e934df 100644
--- a/server.js
+++ b/server.js
@@ -612,7 +612,7 @@ const QUERY_IS_RANDOM = db.prepare("SELECT random FROM games WHERE game_id = ?")
const QUERY_JOIN_GAME_TRY = db.prepare("INSERT OR IGNORE INTO players (user_id, game_id, role) VALUES (?,?,?)");
const QUERY_JOIN_GAME = db.prepare("INSERT INTO players (user_id, game_id, role) VALUES (?,?,?)");
const QUERY_PART_GAME = db.prepare("DELETE FROM players WHERE game_id = ? AND role = ?");
-const QUERY_START_GAME = db.prepare("UPDATE games SET status = 1, state = ?, active = ? WHERE game_id = ?");
+const QUERY_START_GAME = db.prepare("UPDATE games SET status = 1, state = ?, active = ?, mtime = datetime('now') WHERE game_id = ?");
const QUERY_CREATE_GAME = db.prepare(`
INSERT INTO games
(owner_id,title_id,scenario,private,random,ctime,mtime,description,status,state)