summaryrefslogtreecommitdiffstats
path: root/src/server/db.scm
diff options
context:
space:
mode:
authorThomas Hintz <t@thintz.com>2020-04-22 18:57:15 -0700
committerThomas Hintz <t@thintz.com>2020-04-22 18:57:15 -0700
commitb947c646cf6c3be92fc711c7988a93b52b3b6bdb (patch)
treee79a01ffccaabf870a1f4e37b02dc9becf46b8c0 /src/server/db.scm
parent7ba6f19133377113d2521f3bcd790e16a35b21b3 (diff)
downloadfarm-leave-game.tar.gz
Diffstat (limited to 'src/server/db.scm')
-rw-r--r--src/server/db.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/db.scm b/src/server/db.scm
index 17138e6..417207d 100644
--- a/src/server/db.scm
+++ b/src/server/db.scm
@@ -127,6 +127,11 @@
(exec (sql db "insert into user_games(user_id, game_id) values (?, ?);")
user-id game-id)))
+(define (db-remove-user-game user-id game-id)
+ (with-db (db)
+ (exec (sql db "delete from user_games where user_id=? and game_id=?;")
+ user-id game-id)))
+
(define (db-fetch-user-games user-id)
(with-db (db)
(query fetch-column