MAJOR: Reworked database to be easier to use and close automatically to prevent resource leaks

This commit is contained in:
JustIceO7
2025-01-29 17:47:29 +00:00
parent 83b458ed99
commit dfdbe4a7d4
9 changed files with 181 additions and 209 deletions

View File

@@ -48,7 +48,6 @@ def signup():
# Create a connection to the database
db = Database()
db.create_connection()
try:
# Check for duplicate email/username, no two users can have the same
@@ -150,7 +149,6 @@ def login():
# Create a connection to the database
db = Database()
db.create_connection()
try:
# Check if user exists, only existing users can be logged in