From 6956870827bae86aaa19a740a7cb449220dfe5ef Mon Sep 17 00:00:00 2001 From: rene Date: Wed, 13 May 2026 20:15:16 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Logo-URL=20/media/=20korrekt;=20Z=C3=BCc?= =?UTF-8?q?hter-Section=20im=20Sidebar=20mit=20Label+Trennlinie=20(SW=20by?= =?UTF-8?q?-v914)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 2 +- backend/routes/breeder.py | 8 ++++---- backend/static/index.html | 38 +++++++++++++++++++++++--------------- backend/static/js/app.js | 10 +++------- backend/static/sw.js | 2 +- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/backend/main.py b/backend/main.py index 9753d4f..c4645f1 100644 --- a/backend/main.py +++ b/backend/main.py @@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "913" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "914" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/routes/breeder.py b/backend/routes/breeder.py index 9109162..1afe535 100644 --- a/backend/routes/breeder.py +++ b/backend/routes/breeder.py @@ -71,7 +71,7 @@ async def breeder_status(user=Depends(get_current_user)): "profile": dict(profile) if profile else None, } if profile: - result["profile"]["logo_url"] = f"/api/media/{logo['file_path']}" if logo else None + result["profile"]["logo_url"] = f"/media/{logo['file_path']}" if logo else None return result @@ -417,7 +417,7 @@ async def breeder_public_profile(zwingername: str): WHERE breeder_id=? AND entity_type='breeder' ORDER BY sort_order, id LIMIT 1 """, (breeder_id,)).fetchone() - result["logo_url"] = f"/api/media/{logo['file_path']}" if logo else None + result["logo_url"] = f"/media/{logo['file_path']}" if logo else None # Öffentliche Fotos für die Gallery (alle entity_type='breeder', max. 12) photos = conn.execute(""" @@ -426,8 +426,8 @@ async def breeder_public_profile(zwingername: str): ORDER BY is_primary DESC, sort_order, id LIMIT 12 """, (breeder_id,)).fetchall() result["fotos"] = [{ - "url": f"/api/media/{p['file_path']}", - "thumb": f"/api/media/{p['thumbnail_path']}" if p['thumbnail_path'] else f"/api/media/{p['file_path']}", + "url": f"/media/{p['file_path']}", + "thumb": f"/media/{p['thumbnail_path']}" if p['thumbnail_path'] else f"/media/{p['file_path']}", "caption": p["caption"] or "", "primary": bool(p["is_primary"]), } for p in photos] diff --git a/backend/static/index.html b/backend/static/index.html index 99c47e7..410cf3d 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -248,17 +248,25 @@ Erste Hilfe - - -