diff --git a/src/endpoints/bettwaage.py b/src/endpoints/bettwaage.py index 9319eb1..2efad60 100644 --- a/src/endpoints/bettwaage.py +++ b/src/endpoints/bettwaage.py @@ -23,7 +23,7 @@ def convert_to_weight(value: int, zero_value: int, scale: float) -> float: return (value - zero_value) * scale -@router.get("/file") +@router.get("/file", tags=["file"]) async def get_file(): with open(file_path, "r", encoding="UTF-8") as fp: return HTMLResponse("\n".join(fp.readlines())) @@ -43,12 +43,12 @@ async def add_weight(tl: int, tr: int, bl: int, br: int): add_line_to_history(f"{str(datetime.now())};{tl};{tr};{bl};{br};{sum};") -@router.post("/delete") +@router.post("/delete", tags=["file"]) async def delete_file(): os.remove(file_path) -@router.post("/zero") +@router.post("/zero", tags=["calibration"]) async def set_zero(): if latest_values is None: return HTMLResponse( @@ -58,7 +58,7 @@ async def set_zero(): zero_values = latest_values -@router.post("/scales") +@router.post("/scales", tags=["calibration"]) async def set_scales(tl: float, tr: float, bl: float, br: float): global scale_values scale_values = [tl, tr, bl, br]