Sprint 19: Social, UX-Verbesserungen, Nerd2Noob-Hilfe
This commit is contained in:
parent
10d30bf565
commit
89d87030a2
18 changed files with 930 additions and 74 deletions
|
|
@ -243,6 +243,22 @@ async def upload_dokument(
|
|||
return {"datei_url": datei_url, "datei_typ": datei_typ}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# GET /api/dogs/{dog_id}/health/gewicht — Gewichtsverlauf
|
||||
# ------------------------------------------------------------------
|
||||
@router.get("/{dog_id}/health/gewicht")
|
||||
async def list_gewicht(dog_id: int, user=Depends(get_current_user)):
|
||||
with db() as conn:
|
||||
_check_dog_owner(conn, dog_id, user["id"])
|
||||
rows = conn.execute(
|
||||
"""SELECT datum, wert AS gewicht FROM health
|
||||
WHERE dog_id=? AND typ='gewicht' AND wert IS NOT NULL
|
||||
ORDER BY datum ASC""",
|
||||
(dog_id,)
|
||||
).fetchall()
|
||||
return [dict(r) for r in rows]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# POST /api/dogs/{dog_id}/health/symptom-check — KI-Symptomprüfung
|
||||
# ------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue