diff --git a/backend/inbox/app.py b/backend/inbox/app.py index 28df178..1ca96ea 100644 --- a/backend/inbox/app.py +++ b/backend/inbox/app.py @@ -68,7 +68,7 @@ class EmailReplyBody(BaseModel): @router.get("/email/fetch") async def fetch_email( - top:int=Query(100), + top:int=Query(100,ge=1,le=100), skip:int=Query(0,ge=0), test_on: bool = Query(True), token: str | None = Query(None), @@ -100,7 +100,7 @@ async def fetch_email( @router.post("/email/sync") async def start_email_sync( - top:int=Query(100), + top:int=Query(100,ge=1,le=100), skip:int=Query(0,ge=0), test_on: bool = Query(True), current_user: dict = Depends(require_permission(PermissionTag.INBOX_EDIT)), diff --git a/backend/inbox/views.py b/backend/inbox/views.py index 43f83b5..1e07af5 100644 --- a/backend/inbox/views.py +++ b/backend/inbox/views.py @@ -34,7 +34,7 @@ triage_logger=logging.getLogger("inbox.triage") # One statement, one round trip — but an unbounded id list is still a client-supplied # IN () of arbitrary size, so the batch is capped and the route answers 413. -MAX_BULK_READ_IDS=500 +MAX_BULK_READ_IDS=100 class Email: