"Feature: Update admin interface and database schema"

This commit is contained in:
2025-05-29 19:02:23 +02:00
parent cf297e8e16
commit ca9abadc6a
3 changed files with 67 additions and 37 deletions

View File

@@ -354,15 +354,18 @@ def login():
@app.route("/auth/logout", methods=["GET", "POST"])
@login_required
def auth_logout():
username = current_user.username if hasattr(current_user, "username") else "Unbekannt"
"""Meldet den Benutzer ab."""
app_logger.info(f"Benutzer {current_user.email} hat sich abgemeldet")
logout_user()
auth_logger.info(f"Benutzer {username} hat sich abgemeldet")
# Unterscheiden zwischen JSON-Anfragen und normalen Anfragen
if request.is_json or request.headers.get('Content-Type') == 'application/json':
return jsonify({"success": True, "redirect_url": url_for("login")})
else:
return redirect(url_for("login"))
flash("Sie wurden erfolgreich abgemeldet.", "info")
return redirect(url_for("login"))
@app.route("/auth/reset-password-request", methods=["GET", "POST"])
def reset_password_request():
"""Passwort-Reset anfordern (Placeholder)."""
# TODO: Implement password reset functionality
flash("Passwort-Reset-Funktionalität ist noch nicht implementiert.", "info")
return redirect(url_for("login"))
@app.route("/auth/api/login", methods=["POST"])
def api_login():