Fixed edge case response
This commit is contained in:
parent
dd3264365c
commit
63e1c29e52
1 changed files with 2 additions and 0 deletions
|
@ -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(
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue