Skip to content

Commit a15a3d4

Browse files
committed
http: limit search results to 100 results
The search implementation is pretty naive and isn't responsive when returning 500 results. Signed-off-by: Jérémie Galarneau <[email protected]>
1 parent 169ee6f commit a15a3d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/canadiantracker/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def compute_sku_stats_light(sku: storage._StorageSku) -> dict:
119119
@app.get("/api/search")
120120
async def api_search(q: str = "") -> list[dict]:
121121
"""Search products/SKUs by name, code, or SKU."""
122-
max_search_results = 500
122+
max_search_results = 100
123123

124124
query = q.strip()
125125
if not query:

0 commit comments

Comments
 (0)