From 5becf3083420f335fdfbd4a6534c5ac1aecab41f Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Wed, 14 Jun 2023 20:58:22 +0200 Subject: [PATCH] Added update server side --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ca004c7..ba9b6cc 100644 --- a/main.py +++ b/main.py @@ -224,6 +224,7 @@ def get_id(): c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ") conn.commit() finished = queue_item + socketio.emit("update", "update") return make_response("True") elif tag_list != []: @@ -231,8 +232,9 @@ def get_id(): if users.qsize() == 0: c.execute(f"UPDATE users SET balance = balance - 1 WHERE id={tag[1]}") conn.commit() + socketio.emit("update", "update") return make_response("True") - + socketio.emit("update", "update") return make_response("False") def main():