Update SearchController.cs
This commit is contained in:
parent
1fcd149de4
commit
d63cb15df1
@ -34,8 +34,8 @@ public class SearchController : Controller {
|
|||||||
if (_searchCache is not null)
|
if (_searchCache is not null)
|
||||||
return SearchCached(query, preview, deep);
|
return SearchCached(query, preview, deep);
|
||||||
else return Search(query, preview, deep);
|
else return Search(query, preview, deep);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Product> Search(string query, bool? preview, bool? deep) {
|
private List<Product> Search(string query, bool? preview, bool? deep) {
|
||||||
List<Product> products = new();
|
List<Product> products = new();
|
||||||
|
|
||||||
@ -86,8 +86,10 @@ public class SearchController : Controller {
|
|||||||
|
|
||||||
query = query.Trim();
|
query = query.Trim();
|
||||||
|
|
||||||
if (_searchCache is null)
|
if (_searchCache is null) {
|
||||||
|
_logger.LogError(8, "Erreur de cache.");
|
||||||
return products;
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
try { // Pour faire une liste priorisée.
|
try { // Pour faire une liste priorisée.
|
||||||
if (preview.HasValue && preview == true)
|
if (preview.HasValue && preview == true)
|
||||||
|
Loading…
Reference in New Issue
Block a user