typo and typu
This commit is contained in:
parent
41bafbdb2a
commit
e4edf6b626
1 changed files with 2 additions and 5 deletions
7
main.py
7
main.py
|
@ -72,7 +72,6 @@ def confirm_remove_user():
|
||||||
@app.route("/removeuser", methods=['GET'])
|
@app.route("/removeuser", methods=['GET'])
|
||||||
def remove_user():
|
def remove_user():
|
||||||
user_id = request.args.get("id")
|
user_id = request.args.get("id")
|
||||||
#Noch eine Bestätigung nötig
|
|
||||||
c.execute(f"SELECT * FROM users WHERE id={user_id}")
|
c.execute(f"SELECT * FROM users WHERE id={user_id}")
|
||||||
user_name = c.fetchall()[0][1]
|
user_name = c.fetchall()[0][1]
|
||||||
c.execute(f"DELETE FROM tags WHERE userid={user_id}")
|
c.execute(f"DELETE FROM tags WHERE userid={user_id}")
|
||||||
|
@ -172,9 +171,7 @@ def request_removetag(data):
|
||||||
join_room(session[id])
|
join_room(session[id])
|
||||||
if len(users.queue) > 0:
|
if len(users.queue) > 0:
|
||||||
queue_item = users.queue[len(users.queue) - 1]
|
queue_item = users.queue[len(users.queue) - 1]
|
||||||
user = queue[0]
|
user = queue_item[0]
|
||||||
print(user)
|
|
||||||
print(session[id])
|
|
||||||
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])
|
||||||
i = 0
|
i = 0
|
||||||
|
@ -217,7 +214,7 @@ def get_id():
|
||||||
if state == "add":
|
if state == "add":
|
||||||
c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, {user})")
|
c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, {user})")
|
||||||
elif state == "remove":
|
elif state == "remove":
|
||||||
c.execute(f"DELETE * FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ")
|
c.execute(f"DELETE FROM tags WHERE (tagid = {tag_id} AND userid = {user}) ")
|
||||||
conn.commit()
|
conn.commit()
|
||||||
finished = queue_item
|
finished = queue_item
|
||||||
return make_response("True")
|
return make_response("True")
|
||||||
|
|
Loading…
Reference in a new issue