Compare commits

..

2 commits

View file

@ -133,10 +133,10 @@ def remove_user():
users = c.fetchall() users = c.fetchall()
if users != []: if users != []:
user_name = users[0][1] user_name = users[0][1]
c.execute(f"DELETE FROM tags WHERE userid={user_id}") c.execute(f"DELETE FROM tags WHERE userid=?", [user_id])
db_log.info(f"Deleted all tags from user {user_id}") db_log.info(f"Deleted all tags from user ?", [user_id])
c.execute(f"DELETE FROM users WHERE id={user_id}") c.execute(f"DELETE FROM users WHERE id=?", [user_id])
db_log.info(f"Deleted user {user_id}") db_log.info(f"Deleted user ?", [user_id])
conn.commit() conn.commit()
socketio.emit("update", "update") socketio.emit("update", "update")
return f'<p><p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p> <p>Deleted user {escape(user_name)}</p><a href="/list">return to the tags and user list</a></p>' return f'<p><p><a href="/list">user and tag list</a> | <a href="/documentation">Documentation</a></p> <p>Deleted user {escape(user_name)}</p><a href="/list">return to the tags and user list</a></p>'