using Bootstrap.Admin.Models; using Bootstrap.DataAccess; using Longbow.Web.WebSockets; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; namespace Bootstrap.Admin.Controllers { /// /// /// public class HomeController : Controller { /// /// /// /// public ActionResult Index() { var v = new HeaderBarModel(User.Identity) { HomeUrl = DictHelper.RetrieveHomeUrl() }; return v.HomeUrl.StartsWith("~/") ? (ActionResult)View(v) : Redirect(v.HomeUrl); } /// /// /// /// /// [AllowAnonymous] public IActionResult Error(int id) { return id == 404 ? View("NotFound") : View(); } } }