UX: Privater-Header mit Zwingername + Logo auf allen Züchter-Seiten (SW by-v910)

This commit is contained in:
rene 2026-05-13 19:48:58 +02:00
parent a577e6d8d9
commit ccf5a8b7ba
8 changed files with 117 additions and 57 deletions

View file

@ -58,11 +58,21 @@ async def breeder_status(user=Depends(get_current_user)):
"FROM breeder_profiles WHERE user_id=?",
(user["id"],)
).fetchone()
return {
if profile:
logo = conn.execute(
"""SELECT file_path FROM breeder_photos
WHERE breeder_id=? AND entity_type='breeder'
ORDER BY is_primary DESC, id LIMIT 1""",
(profile["id"],)
).fetchone()
result = {
"rolle": row["rolle"],
"breeder_status": row["breeder_status"],
"profile": dict(profile) if profile else None,
}
if profile:
result["profile"]["logo_url"] = f"/api/media/{logo['file_path']}" if logo else None
return result
# ------------------------------------------------------------------