"Refactor database schema for user authentication and data migration" (feat: feat or fix)
This commit is contained in:
12
app.py
12
app.py
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user