From 6bdc77b68529344b12d32539ee3691a0dcf20662 Mon Sep 17 00:00:00 2001 From: "yuliya.mavrina@internet.ru" Date: Wed, 15 May 2024 08:37:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=5F7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RenovationWork/RenovationWorkClientApp/APIClient.cs | 3 +-- .../RenovationWorkClientApp/Controllers/HomeController.cs | 6 ++---- .../RenovationWorkRestApi/Controllers/ClientController.cs | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/RenovationWork/RenovationWorkClientApp/APIClient.cs b/RenovationWork/RenovationWorkClientApp/APIClient.cs index 43817f4..3d40622 100644 --- a/RenovationWork/RenovationWorkClientApp/APIClient.cs +++ b/RenovationWork/RenovationWorkClientApp/APIClient.cs @@ -13,8 +13,7 @@ namespace RenovationWorkClientApp { _client.BaseAddress = new Uri(configuration["IPAddress"]); _client.DefaultRequestHeaders.Accept.Clear(); - _client.DefaultRequestHeaders.Accept.Add(new - MediaTypeWithQualityHeaderValue("application/json")); + _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } public static T? GetRequest(string requestUrl) { diff --git a/RenovationWork/RenovationWorkClientApp/Controllers/HomeController.cs b/RenovationWork/RenovationWorkClientApp/Controllers/HomeController.cs index 17a8294..183df05 100644 --- a/RenovationWork/RenovationWorkClientApp/Controllers/HomeController.cs +++ b/RenovationWork/RenovationWorkClientApp/Controllers/HomeController.cs @@ -125,8 +125,7 @@ namespace RenovationWorkClientApp.Controllers { throw new Exception("Количество и сумма должны быть\r\nбольше 0"); } - APIClient.PostRequest("api/main/createorder", new - OrderBindingModel + APIClient.PostRequest("api/main/createorder", new OrderBindingModel { ClientId = APIClient.Client.Id, RepairId = repair, @@ -148,8 +147,7 @@ namespace RenovationWorkClientApp.Controllers { return Redirect("~/Home/Enter"); } - return - View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); + return View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); } } } \ No newline at end of file diff --git a/RenovationWork/RenovationWorkRestApi/Controllers/ClientController.cs b/RenovationWork/RenovationWorkRestApi/Controllers/ClientController.cs index e91369d..e42a30b 100644 --- a/RenovationWork/RenovationWorkRestApi/Controllers/ClientController.cs +++ b/RenovationWork/RenovationWorkRestApi/Controllers/ClientController.cs @@ -55,10 +55,7 @@ namespace RenovationWorkRestApi.Controllers { try { - return _mailLogic.ReadList(new MessageInfoSearchModel - { - ClientId = clientId - }); + return _mailLogic.ReadList(new MessageInfoSearchModel{ ClientId = clientId }); } catch (Exception ex) {