fix: fix page size constrain

This commit is contained in:
acgnhik 2022-08-24 12:04:22 +08:00
parent fd18d89808
commit ebf75ab487

View File

@ -34,7 +34,7 @@ router = APIRouter(
@router.get('/data')
async def get_task_data(
page: PositiveInt = 1,
size: conint(ge=10, lt=100) = 100, # type: ignore
size: conint(ge=10, le=100) = 100, # type: ignore
filter: TaskDataFilter = Depends(task_data_filter)
) -> List[Dict[str, Any]]:
start = (page - 1) * size