using ComputerHardwareStoreContracts.ViewModels; using Microsoft.AspNetCore.Mvc; using System.Diagnostics; using StoreKeeperClient.Models; namespace StoreKeeperClient.Controllers { public class HomeController : Controller { private readonly ILogger _logger; public HomeController(ILogger logger) { _logger = logger; } [HttpGet] public IActionResult Index() { return View(); } [HttpGet] public IActionResult Privacy() { return View(); } [HttpGet] public IActionResult Enter() { return View(); } [HttpGet] public IActionResult Register() { return View(); } [HttpGet] public IActionResult AddBuildToPurchase() { return View(); } [HttpGet] public IActionResult Builds() { return View(new List()); } [HttpGet] public IActionResult BuildCreate() { return View(); } [HttpGet] public IActionResult BuildDelete() { return View(); } [HttpGet] public IActionResult BuildUpdate() { return View(); } [HttpGet] public IActionResult CommentCreate() { return View(); } [HttpGet] public IActionResult CommentDelete() { return View(); } [HttpGet] public IActionResult CommentUpdate() { return View(); } [HttpGet] public IActionResult Comments() { return View(new List()); } [HttpGet] public IActionResult ProductsList() { return View(new List()); } [HttpGet] public IActionResult PurchaseCreate() { return View(); } [HttpGet] public IActionResult PurchaseDelete() { return View(); } [HttpGet] public IActionResult Purchases() { return View(new List()); } [HttpGet] public IActionResult PurchaseUpdate() { return View(); } [HttpGet] public IActionResult Report() { return View(new List()); } [HttpPost] public void Report(string password) { Response.Redirect("ReportOnly"); } public IActionResult Mails() { if (APIClient.Client == null) { return Redirect("~/Home/Enter"); } return View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); } [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } }