"Refactor database schema for user authentication and data migration" (feat: feat or fix)

This commit is contained in:
2025-05-10 23:29:42 +02:00
parent 40c3f6d9b4
commit f677e98795
4 changed files with 300 additions and 12 deletions

12
app.py
View File

@@ -1831,18 +1831,6 @@ def unauthorized(e):
flash("Sie müssen sich anmelden, um auf diese Seite zuzugreifen.", "error")
return redirect(url_for('login'))
# Hilfsfunktion zur Fehlerbehandlung in API-Endpunkten
def handle_api_exception(func):
"""Decorator für API-Endpunkte zur einheitlichen Fehlerbehandlung"""
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as e:
# Log und API-Fehler zurückgeben
return ErrorHandler.handle_exception(e, is_api_request=True)
return wrapper
# OpenAI-Integration für KI-Assistenz
@app.route('/api/assistant', methods=['POST'])
def chat_with_assistant():