From f749e8fcb4a574af1def38928e0c04b4fc5c5d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9?= Date: Sun, 2 Apr 2023 19:30:57 +0400 Subject: [PATCH] fix --- .../Views/Worker/Purchases.cshtml | 26 ------------------- .../Controllers/ClientController.cs | 20 +------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/HardwareShop/HardwareShopClientApp/Views/Worker/Purchases.cshtml b/HardwareShop/HardwareShopClientApp/Views/Worker/Purchases.cshtml index 00a5581..b7b3c25 100644 --- a/HardwareShop/HardwareShopClientApp/Views/Worker/Purchases.cshtml +++ b/HardwareShop/HardwareShopClientApp/Views/Worker/Purchases.cshtml @@ -45,12 +45,6 @@

Покупки

- @{ - if (Model == null) - { -

Авторизируйтесь

- return; - } @@ -72,26 +66,6 @@ - @foreach (var item in Model) - { - - - - - - - - }
- @Html.DisplayFor(modelItem => item.Id) - - @Html.DisplayFor(modelItem => item.DatePurchase) - - @Html.DisplayFor(modelItem => item.Sum) - - @Html.DisplayFor(modelItem => item.PurchaseStatus) - - @Html.DisplayFor(modelItem => item.UserLogin) -
} diff --git a/HardwareShop/HardwareShopRestApi/Controllers/ClientController.cs b/HardwareShop/HardwareShopRestApi/Controllers/ClientController.cs index a3f1a9b..dff5017 100644 --- a/HardwareShop/HardwareShopRestApi/Controllers/ClientController.cs +++ b/HardwareShop/HardwareShopRestApi/Controllers/ClientController.cs @@ -15,13 +15,10 @@ namespace HardwareShopRestApi.Controllers private readonly IUserLogic _logic; - private readonly IPurchaseLogic _purchaseLogic; - - public ClientController(IUserLogic logic, IPurchaseLogic purchaseLogic, ILogger logger) + public ClientController(IUserLogic logic, ILogger logger) { _logger = logger; _logic = logic; - _purchaseLogic = purchaseLogic; } [HttpGet] @@ -55,20 +52,5 @@ namespace HardwareShopRestApi.Controllers throw; } } - - [HttpGet] - public List? GetPurchases(int userId) - { - try - { - return _purchaseLogic.ReadList(new PurchaseSearchModel { UserId = userId }); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка получения списка заказов клиента id={Id}", userId); - throw; - } - } - } } \ No newline at end of file