add limit cap and remove unused import

This commit is contained in:
qananasikq
2026-04-16 20:44:27 +03:00
parent f47081d273
commit 47221dc1c8
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
# Роуты запуска задач синхронизации Encar и просмотра истории sync-runs.
from fastapi import APIRouter, Depends, Query
from pydantic import BaseModel
from pydantic import BaseModel, Field
from sqlalchemy import select, func
from ..deps import get_persistence
@@ -25,7 +25,7 @@ class SyncListingRequest(BaseModel):
year_to: int | None = None
price_max: int | None = None
lane: str = "encar"
limit: int | None = None
limit: int | None = Field(default=None, le=500_000)
@router.post("/tasks/sync-vehicle")