Make it look spooky and halloween themed, delete all posts from user when deleting account and change post usernames when changing username

This commit is contained in:
csd4ni3l
2025-10-25 15:29:08 +02:00
parent 1280d805d6
commit 5942061b16
4 changed files with 50 additions and 4 deletions
+2
View File
@@ -192,6 +192,7 @@ def change_username():
cur = get_db().cursor()
cur.execute("UPDATE Users SET username = ? WHERE username = ?", (new_username, username))
cur.execute("UPDATE Posts SET username = ? WHERE username = ?", (new_username, username))
get_db().commit()
cur.close()
@@ -234,6 +235,7 @@ def delete_account():
cur = get_db().cursor()
cur.execute("DELETE FROM Users WHERE username = ?", (username,))
cur.execute("DELETE FROM Posts WHERE username = ?", (username,))
get_db().commit()
cur.close()