forked from bton/matekasse
fix log
This commit is contained in:
parent
2d6d14ebba
commit
84a46c8970
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue