remove tag button

This commit is contained in:
2000-Trek 2023-11-25 20:11:15 +01:00
parent 27c3981569
commit b60b40023e

View file

@ -289,7 +289,13 @@ def create_app(test_config=None):
db.commit() db.commit()
message = f"Removed {tag_id} from user {user_id}" message = f"Removed {tag_id} from user {user_id}"
log(type="removetag", userid=user_id, before=tag_id) log(type="removetag", userid=user_id, before=tag_id)
return message return f"""
<html>
<script>
window.location="/"
</script>
</html>
"""
else: else:
return render_template("error.html", error_code="054") return render_template("error.html", error_code="054")
@ -299,7 +305,7 @@ def create_app(test_config=None):
global message global message
join_room(session[id]) join_room(session[id])
if len(user_queue.queue) > 0: if len(user_queue.queue) > 0:
queue_item = user_queue.queue[len(user_queue.queue) - 1] queue_item = user_queue.queue[0]
user = queue_item[0] user = queue_item[0]
if queue_item == [data["data"], "remove", session[id]]: if queue_item == [data["data"], "remove", session[id]]:
socketio.emit("wait", "wait", to=session[id]) socketio.emit("wait", "wait", to=session[id])