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 +