Spaces:
Sleeping
Sleeping
Update auth.py
Browse files
auth.py
CHANGED
|
@@ -105,6 +105,8 @@ def get_db_connection():
|
|
| 105 |
"""Create and return a database connection with proper error handling"""
|
| 106 |
try:
|
| 107 |
# Ensure the directory exists
|
|
|
|
|
|
|
| 108 |
db_dir = os.path.dirname(DB_PATH)
|
| 109 |
os.makedirs(db_dir, exist_ok=True)
|
| 110 |
|
|
|
|
| 105 |
"""Create and return a database connection with proper error handling"""
|
| 106 |
try:
|
| 107 |
# Ensure the directory exists
|
| 108 |
+
DB_PATH = os.getenv("DB_PATH", "/tmp/data/user_data.db")
|
| 109 |
+
|
| 110 |
db_dir = os.path.dirname(DB_PATH)
|
| 111 |
os.makedirs(db_dir, exist_ok=True)
|
| 112 |
|