From 6f2a8a0d8f54644c3c20dc306e35096b768628c8 Mon Sep 17 00:00:00 2001 From: grabowski Date: Sun, 9 Aug 2026 17:11:26 +0700 Subject: [PATCH] feat: add all-time history option and increase limit to 10k --- src/web_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web_api.py b/src/web_api.py index a2226d7..ab51337 100644 --- a/src/web_api.py +++ b/src/web_api.py @@ -444,7 +444,7 @@ async def get_thaiwater_sensors(): @app.get("/measurements/history/{station_code}") async def get_postgres_history( station_code: str, - hours: int = Query(168, ge=1, le=24 * 365), + hours: int = Query(168, ge=1), limit: int = Query(2000, ge=1, le=5000), ): """Get historical measurements for a station from PostgreSQL."""