From 7447b1ad401afad2f2868a61248e91b9b67852cd Mon Sep 17 00:00:00 2001 From: MarcEricMartel <74071476+MarcEricMartel@users.noreply.github.com> Date: Tue, 18 Oct 2022 11:48:34 -0700 Subject: [PATCH] lolllllllll --- .../GrossesMitainesAPI/Controllers/InventoryController.cs | 2 +- .../GrossesMitainesAPI/Controllers/SearchController.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GrossesMitaines/GrossesMitainesAPI/Controllers/InventoryController.cs b/GrossesMitaines/GrossesMitainesAPI/Controllers/InventoryController.cs index 6aafcb5..4f8210e 100644 --- a/GrossesMitaines/GrossesMitainesAPI/Controllers/InventoryController.cs +++ b/GrossesMitaines/GrossesMitainesAPI/Controllers/InventoryController.cs @@ -118,7 +118,7 @@ public class InventoryController : Controller { if (prod.Quantity == 0) prod.Status = prod.Status == Product.States.Clearance? Product.States.Discontinued: - Product.States.Unavailable; + Product.States.BackOrder; } else { _logger.LogError(8, "Vente de produit pas en stock."); diff --git a/GrossesMitaines/GrossesMitainesAPI/Controllers/SearchController.cs b/GrossesMitaines/GrossesMitainesAPI/Controllers/SearchController.cs index 52fe2ea..1ac8c5c 100644 --- a/GrossesMitaines/GrossesMitainesAPI/Controllers/SearchController.cs +++ b/GrossesMitaines/GrossesMitainesAPI/Controllers/SearchController.cs @@ -41,8 +41,8 @@ public class SearchController : Controller { List title = new(), desc = new(), cat = new(); query = query.ToLower(); - foreach (Product prod in _searchCache) { - string sTitle = prod.Title.Replace(".", " ").Replace(",", " ").ToLower(), + foreach (Product prod in _searchCache) { + string sTitle = prod.Title.Replace(".", " ").Replace(",", " ").ToLower(), sCat = prod.Category.Replace(".", " ").Replace(",", " ").ToLower(), sDesc = prod.Description.Replace(".", " ").Replace(",", " ").ToLower();