From bbbf548d667cd09b17a5353eac6100d3ec332745 Mon Sep 17 00:00:00 2001 From: grabowski Date: Sun, 9 Aug 2026 17:36:58 +0700 Subject: [PATCH] fix: align web API limit cap with 10k and clean up postgres_history imports --- 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 3c25695..2e85791 100644 --- a/src/web_api.py +++ b/src/web_api.py @@ -452,7 +452,7 @@ async def get_thaiwater_sensors(): async def get_postgres_history( station_code: str, hours: int = Query(168, ge=1), - limit: int = Query(2000, ge=1, le=5000), + limit: int = Query(2000, ge=1, le=10000), ): """Get historical measurements for a station from PostgreSQL.""" cache_key = f"{station_code}:{hours}:{limit}"