HomeController edited

This commit is contained in:
VictoriaPresnyakova 2023-04-30 18:21:58 +04:00
parent 52ba10a630
commit 2aeb4f6896

View File

@ -149,5 +149,14 @@ namespace JewelryStoreClientApp.Controllers
return count * (prod?.Price ?? 1); 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}"));
}
} }
} }