Spaces:
Paused
Paused
Commit
·
414be40
1
Parent(s):
d5ce498
Auto-commit: app.py updated
Browse files
app.py
CHANGED
|
@@ -180,9 +180,14 @@ def init_database():
|
|
| 180 |
)
|
| 181 |
""")
|
| 182 |
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
| 187 |
def hash_password(password):
|
| 188 |
"""Hash password using SHA-256"""
|
|
|
|
| 180 |
)
|
| 181 |
""")
|
| 182 |
|
| 183 |
+
conn.commit()
|
| 184 |
+
conn.close()
|
| 185 |
+
logger.info("Database initialized successfully")
|
| 186 |
+
return True
|
| 187 |
+
|
| 188 |
+
except Exception as e:
|
| 189 |
+
logger.error(f"Database initialization failed: {e}")
|
| 190 |
+
return False
|
| 191 |
|
| 192 |
def hash_password(password):
|
| 193 |
"""Hash password using SHA-256"""
|