This commit is contained in:
MarcEricMartel
2022-10-25 07:54:11 -07:00
parent 16c9adb92b
commit 1fcd149de4
3 changed files with 54 additions and 16 deletions

View File

@@ -86,6 +86,9 @@ public class SearchController : Controller {
query = query.Trim();
if (_searchCache is null)
return products;
try { // Pour faire une liste priorisée.
if (preview.HasValue && preview == true)
products = _searchCache.Where(x => x.Title.Contains(query)).Take(PREVIEW).ToList();