Update SearchController.cs

This commit is contained in:
MarcEricMartel 2022-10-25 08:51:59 -07:00
parent 1fcd149de4
commit d63cb15df1

View File

@ -34,8 +34,8 @@ public class SearchController : Controller {
if (_searchCache is not null)
return SearchCached(query, preview, deep);
else return Search(query, preview, deep);
}
private List<Product> Search(string query, bool? preview, bool? deep) {
List<Product> products = new();
@ -86,8 +86,10 @@ public class SearchController : Controller {
query = query.Trim();
if (_searchCache is null)
if (_searchCache is null) {
_logger.LogError(8, "Erreur de cache.");
return products;
}
try { // Pour faire une liste priorisée.
if (preview.HasValue && preview == true)