forked from bton/matekasse
Addet saftey stuf to prevent sql errors in /removeuser
This commit is contained in:
parent
8f2f70403d
commit
ed3160a5ac
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
@ -66,7 +66,7 @@ def new_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 = '%s' % request.args.get("id")
|
||||||
c.execute(f"DELETE * FROM tags WHERE (userid = {user_id}) ") #Ist hier noch eine Bestätigung nötig?
|
c.execute(f"DELETE * FROM tags WHERE (userid = {user_id}) ") #Ist hier noch eine Bestätigung nötig?
|
||||||
c.execute(f"DELETE * FROM users WHERE (id={user_id})")
|
c.execute(f"DELETE * FROM users WHERE (id={user_id})")
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
Loading…
Reference in a new issue