#region ========================================================================= USING ===================================================================================== using Lumina.Presentation.Web.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System.Diagnostics; #endregion namespace Lumina.Presentation.Web.Controllers; /// /// Controller for home page. /// [Authorize] [Route("")] // handle root path - this is needed because app.UseCultureRedirect will redirect to the correct route [Route("{culture}")] // culture-specific routes public class HomeController : Controller { private readonly ILogger _logger; /// /// Initializes a new instance of the class. /// /// Injected service for logging. public HomeController(ILogger logger) { _logger = logger; } /// /// Displays the view for the home page. /// [HttpGet("")] public IActionResult Index() { return View(); } /// /// Displays the view for privacy. /// [HttpGet("privacy")] public IActionResult Privacy() { return View(); } /// /// Displays the view for errors. /// [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] [HttpGet("error")] public IActionResult Error() { return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } /// /// Displays the view for errors. /// [HttpGet("not-found")] public IActionResult NotFoundView() { return View("/Views/Shared/NotFound.cshtml"); } }