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

@@ -1,5 +1,4 @@
from flask import Blueprint, session
from database.db_context import get_db
import smtplib
from email.mime.text import MIMEText
from os import getenv
@@ -20,7 +19,6 @@ def send_email() -> None:
# Get the users email address
db = get_db()
db.create_connection()
user_email = db.fetchone("""
SELECT email
FROM users