fix(shopping): augmenter limite catalogue 50→500 — tous les articles visibles
Avec 119 articles en base et limit=50, les articles en fin de liste alphabétique (Îles flottantes, Éponge…) n'apparaissaient pas dans le bottom sheet. Limite portée à 500 côté backend ET frontend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,7 +100,7 @@ async def delete_store(store_id: uuid.UUID, session: AsyncSession = Depends(get_
|
||||
@router.get("/products", response_model=list[ProductResponse])
|
||||
async def search_products(
|
||||
q: str | None = Query(default=None),
|
||||
limit: int = 50,
|
||||
limit: int = 500,
|
||||
session: AsyncSession = Depends(get_session),
|
||||
):
|
||||
stmt = select(Product).order_by(Product.frequency_score.desc(), Product.name)
|
||||
|
||||
@@ -158,7 +158,7 @@ export async function deleteStore(id: string): Promise<void> {
|
||||
|
||||
// ── Products ─────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function searchProducts(q?: string, limit = 50): Promise<Product[]> {
|
||||
export async function searchProducts(q?: string, limit = 500): Promise<Product[]> {
|
||||
const qs = new URLSearchParams({ limit: String(limit) })
|
||||
if (q) qs.set('q', q)
|
||||
return handleResponse(await fetch(`${BASE}/products?${qs}`))
|
||||
|
||||
Reference in New Issue
Block a user