2019-03-25 21:12:16 -05:00
|
|
|
|
using Microsoft.AspNetCore.Diagnostics;
|
2018-02-21 19:29:23 -06:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace WebfrontCore.Controllers
|
|
|
|
|
{
|
2018-03-06 01:22:19 -06:00
|
|
|
|
public class HomeController : BaseController
|
2018-02-21 19:29:23 -06:00
|
|
|
|
{
|
|
|
|
|
public IActionResult Index()
|
|
|
|
|
{
|
2018-03-13 16:30:22 -05:00
|
|
|
|
ViewBag.Description = "IW4MAdmin is a complete server administration tool for IW4x.";
|
2018-05-05 17:52:04 -05:00
|
|
|
|
ViewBag.Title = Localization["WEBFRONT_HOME_TITLE"];
|
2018-03-13 16:30:22 -05:00
|
|
|
|
ViewBag.Keywords = "IW4MAdmin, server, administration, IW4x, MW2, Modern Warfare 2";
|
|
|
|
|
|
2018-02-21 19:29:23 -06:00
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult Error()
|
|
|
|
|
{
|
2018-05-14 12:55:10 -05:00
|
|
|
|
var exceptionFeature = HttpContext.Features.Get<IExceptionHandlerPathFeature>();
|
2018-10-06 11:47:14 -05:00
|
|
|
|
Manager.GetLogger(0).WriteError($"[Webfront] {exceptionFeature.Error.Message}");
|
|
|
|
|
Manager.GetLogger(0).WriteDebug(exceptionFeature.Path);
|
|
|
|
|
Manager.GetLogger(0).WriteDebug(exceptionFeature.Error.StackTrace);
|
2018-05-14 12:55:10 -05:00
|
|
|
|
|
2018-05-05 17:52:04 -05:00
|
|
|
|
ViewBag.Description = Localization["WEBFRONT_ERROR_DESC"];
|
|
|
|
|
ViewBag.Title = Localization["WEBFRONT_ERROR_TITLE"];
|
2018-03-13 16:30:22 -05:00
|
|
|
|
return View();
|
2018-02-21 19:29:23 -06:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|