IW4M-Admin/WebfrontCore/Controllers/HomeController.cs
RaidMax 11e3235d5d fix issue with not loading last connection for admins
continue work on fixing profile
2019-03-25 21:12:16 -05:00

30 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
namespace WebfrontCore.Controllers
{
public class HomeController : BaseController
{
public IActionResult Index()
{
ViewBag.Description = "IW4MAdmin is a complete server administration tool for IW4x.";
ViewBag.Title = Localization["WEBFRONT_HOME_TITLE"];
ViewBag.Keywords = "IW4MAdmin, server, administration, IW4x, MW2, Modern Warfare 2";
return View();
}
public IActionResult Error()
{
var exceptionFeature = HttpContext.Features.Get<IExceptionHandlerPathFeature>();
Manager.GetLogger(0).WriteError($"[Webfront] {exceptionFeature.Error.Message}");
Manager.GetLogger(0).WriteDebug(exceptionFeature.Path);
Manager.GetLogger(0).WriteDebug(exceptionFeature.Error.StackTrace);
ViewBag.Description = Localization["WEBFRONT_ERROR_DESC"];
ViewBag.Title = Localization["WEBFRONT_ERROR_TITLE"];
return View();
}
}
}