fixed error in /removeuser
This commit is contained in:
parent
6500962dc4
commit
24973d555d
1 changed files with 1 additions and 3 deletions
4
main.py
4
main.py
|
@ -66,9 +66,7 @@ def new_user():
|
|||
|
||||
@app.route("/removeuser", methods=['GET'])
|
||||
def remove_user():
|
||||
user_name = request.args.get("id")
|
||||
c.execute("SELECT * FROM users WHERE username = '%s'" % user_name)
|
||||
user_id = c.fetchall()[0][0]
|
||||
user_id = request.args.get("id")
|
||||
c.execute(f"DELETE * FROM tags WHERE userid={user_id}") #Noch eine Bestätigung nötig
|
||||
c.execute(f"DELETE * FROM users WHERE id={user_id}")
|
||||
conn.commit()
|
||||
|
|
Loading…
Reference in a new issue