PIbd - 21 Bakalskaya E.D. LabWork07 BASE #13

Closed
ekallin wants to merge 26 commits from LabWork07 into LabWork06
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 689a7932af - Show all commits

View File

@ -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<List<MessageInfoViewModel>>($"api/client/getmessages?clientId ={ APIClient.Client.Id}"));
}
}
}

View File

@ -32,6 +32,9 @@
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Register">Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asparea="" asp-controller="Home" asp-action="Mails">Письма</a>
</li>
</ul>
</div>
</div>