1
0
Fork 0
forked from bton/matekasse

API test {} anstat %s

This commit is contained in:
2000-Trek 2023-11-08 21:40:41 +01:00
parent c8777ba506
commit 6224a5750c

View file

@ -340,7 +340,7 @@ def create_app(test_config=None):
app.logger.info(message) app.logger.info(message)
finished = queue_item finished = queue_item
db.commit() db.commit()
return make_response(json.dumps({"mode":"message","username":"%s".format(username),"message":"A tag was added"})) return make_response(json.dumps({"mode":"message","username":"{}".format(username),"message":"A tag was added"}))
elif state == "remove": elif state == "remove":
c.execute(f"SELECT * FROM tags WHERE (tagid = {tag_id} AND userid = ?)", [user]) c.execute(f"SELECT * FROM tags WHERE (tagid = {tag_id} AND userid = ?)", [user])
tags = c.fetchall() tags = c.fetchall()
@ -350,7 +350,7 @@ def create_app(test_config=None):
app.logger.info(message) app.logger.info(message)
finished = queue_item finished = queue_item
db.commit() db.commit()
return make_response(json.dumps({"mode":"message","username":"%s".format(username),"message":"A tag was removed"})) return make_response(json.dumps({"mode":"message","username":"{}".format(username),"message":"A tag was removed"}))
else: else:
message = "054" message = "054"
finished = queue_item finished = queue_item