ПИбд-23 Старостин Иван Лабораторная работа №7 #9

Closed
Ivan_Starostin wants to merge 19 commits from lab7 into lab6
Showing only changes of commit 10121d3d93 - Show all commits

View File

@ -148,5 +148,15 @@ namespace ShipyardClientApp.Controllers
APIClient.GetRequest<ShipViewModel>($"api/main/getship?productid={ship}");
return Math.Round(count * (_ship?.Price ?? 1), 2);
}
[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}"));
}
}
}