diff --git a/SushiBarClientApp/Controllers/HomeController.cs b/SushiBarClientApp/Controllers/HomeController.cs index 07ba9b2..0b8589c 100644 --- a/SushiBarClientApp/Controllers/HomeController.cs +++ b/SushiBarClientApp/Controllers/HomeController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; using SushiBarClientApp.Models; using SushiBarContracts.BindingModel; using SushiBarContracts.ViewModels; @@ -136,5 +137,17 @@ namespace SushiBarClientApp.Controllers ); return count * (prod?.Price ?? 1); } + + [HttpGet] + public IActionResult Mails() + { + if (APIClient.Client == null) + { + return Redirect("~/Home/Enter"); + } + return + View(APIClient.GetRequest>($"api/client/getmessages?clientId ={ APIClient.Client.Id}")); +} + } } diff --git a/SushiBarClientApp/Views/Shared/_Layout.cshtml b/SushiBarClientApp/Views/Shared/_Layout.cshtml index a6faae0..98ea206 100644 --- a/SushiBarClientApp/Views/Shared/_Layout.cshtml +++ b/SushiBarClientApp/Views/Shared/_Layout.cshtml @@ -32,6 +32,9 @@ +