From 3b9bca01577d4ef173a4df4cc84c1a6ad700df24 Mon Sep 17 00:00:00 2001 From: tellsense Date: Fri, 3 May 2024 22:37:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=D0=B5=D1=82...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SushiBar/SushiBarClientApp/APIClient.cs | 3 +-- SushiBar/SushiBarClientApp/Controllers/HomeController.cs | 9 +++------ SushiBar/SushiBarClientApp/SushiBarClientApp.csproj | 4 ++++ SushiBar/SushiBarClientApp/Views/Home/Index.cshtml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SushiBar/SushiBarClientApp/APIClient.cs b/SushiBar/SushiBarClientApp/APIClient.cs index ed70a91..93d803e 100644 --- a/SushiBar/SushiBarClientApp/APIClient.cs +++ b/SushiBar/SushiBarClientApp/APIClient.cs @@ -13,8 +13,7 @@ namespace SushiBarClientApp { _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/SushiBar/SushiBarClientApp/Controllers/HomeController.cs b/SushiBar/SushiBarClientApp/Controllers/HomeController.cs index eb4a3b7..3e54f20 100644 --- a/SushiBar/SushiBarClientApp/Controllers/HomeController.cs +++ b/SushiBar/SushiBarClientApp/Controllers/HomeController.cs @@ -19,8 +19,7 @@ namespace SushiBarClientApp.Controllers { return Redirect("~/Home/Enter"); } - return - View(APIClient.GetRequest>($"api/main/getorders?clientId={APIClient.Client.Id}")); + return View(APIClient.GetRequest>($"api/main/getorders?clientId={APIClient.Client.Id}")); } [HttpGet] public IActionResult Privacy() @@ -139,10 +138,8 @@ namespace SushiBarClientApp.Controllers [HttpPost] public double Calc(int count, int sushi) { - var prod = - APIClient.GetRequest($"api/main/getsushi?sushiId={sushi}" - ); - return count * (prod?.Price ?? 1); + var sush = APIClient.GetRequest($"api/main/getsushi?sushiId={sushi}"); + return count * (sush?.Price ?? 1); } } } diff --git a/SushiBar/SushiBarClientApp/SushiBarClientApp.csproj b/SushiBar/SushiBarClientApp/SushiBarClientApp.csproj index 23f9c47..1a31d3f 100644 --- a/SushiBar/SushiBarClientApp/SushiBarClientApp.csproj +++ b/SushiBar/SushiBarClientApp/SushiBarClientApp.csproj @@ -14,6 +14,10 @@ + + + + diff --git a/SushiBar/SushiBarClientApp/Views/Home/Index.cshtml b/SushiBar/SushiBarClientApp/Views/Home/Index.cshtml index 843135f..e98d7a4 100644 --- a/SushiBar/SushiBarClientApp/Views/Home/Index.cshtml +++ b/SushiBar/SushiBarClientApp/Views/Home/Index.cshtml @@ -72,4 +72,4 @@ } - \ No newline at end of file +