From 84a46c89706c12bcbc64bad15354dd529beec143 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Sat, 25 Nov 2023 00:13:17 +0100 Subject: [PATCH] fix log --- Website/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Website/__init__.py b/Website/__init__.py index 34f3383..ddba52c 100644 --- a/Website/__init__.py +++ b/Website/__init__.py @@ -355,18 +355,18 @@ def create_app(test_config=None): return make_response(json.dumps({"mode":"error","error":"170"})) else: c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, ?)", [user]) + db.commit() log(type="addtag", userid=user_id ,after=tag_id) finished = queue_item - db.commit() return make_response(json.dumps({"mode":"message","username":"{}".format(username),"message":"A tag was added"})) elif state == "remove": c.execute(f"SELECT * FROM tags WHERE (tagid = {tag_id} AND userid = ?)", [user]) tags = c.fetchall() if tags != []: c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = ?)", [user]) + db.commit() log(type="removetag", userid=user_id, before=tag_id) finished = queue_item - db.commit() return make_response(json.dumps({"mode":"message","username":"{}".format(username),"message":"A tag was removed"})) else: message = "054"