diff --git a/src/endpoints/bettwaage.py b/src/endpoints/bettwaage.py index cc319c5..a243b28 100644 --- a/src/endpoints/bettwaage.py +++ b/src/endpoints/bettwaage.py @@ -73,6 +73,8 @@ async def add_weight(tl: int, tr: int, bl: int, br: int): @router.post("/latest") async def get_latest(): + if not latest_values: + return HTMLResponse(status_code=200, content="No data given yet") total = sum(latest_values) return JSONResponse( {