diff --git a/main.py b/main.py index d9676bb..44fb6ef 100644 --- a/main.py +++ b/main.py @@ -36,7 +36,7 @@ def exit_handler(): #website @app.route("/") def index(): - return 'user anfrom markupsafe import escaped tag list

The creator of this website accepts no liability for any linguistic or technical errors!



Doumentation' + return 'user and tag list

The creator of this website accepts no liability for any linguistic or technical errors!



Doumentation' @app.route("/list") def list(): @@ -107,13 +107,16 @@ def confirm_remove_user(): def remove_user(): user_id = request.args.get("id") c.execute(f"SELECT * FROM users WHERE id={user_id}") - user_name = c.fetchall()[0][1] - c.execute(f"DELETE FROM tags WHERE userid={user_id}") - c.execute(f"DELETE FROM users WHERE id={user_id}") - conn.commit() - socketio.emit("update", "update") - return f'

Deleted user {user_name}

return to the tags and user list' - + users = c.fetchall() + if users != []: + user_name = users[0][1] + c.execute(f"DELETE FROM tags WHERE userid={user_id}") + c.execute(f"DELETE FROM users WHERE id={user_id}") + conn.commit() + socketio.emit("update", "update") + return f'

Deleted user {user_name}

return to the tags and user list' + else: + return "Error: 043" @app.route("/adduser/user", methods=['GET']) def adduser(): user = request.args.get("username")