Mineplex2018-withcommit/Website/LOC.Website.Web/Controllers/ServersController.cs
Jonathan Williams 3fb52c5c71 Initial Commit
2013-08-27 08:14:08 -07:00

29 lines
716 B
C#

namespace LOC.Website.Web.Controllers
{
using System.Web.Mvc;
using Common;
using Newtonsoft.Json;
public class ServersController : Controller
{
[HttpPost]
public void RegisterServer(string address)
{
ServerStatusManager.Instance.RegisterServer(address);
}
[HttpPost]
public void RemoveServer(string address)
{
ServerStatusManager.Instance.RemoveServer(address);
}
[HttpPost]
public ActionResult GetServers()
{
var json = JsonConvert.SerializeObject(ServerStatusManager.Instance.GetServers());
return Content(json, "application/json");
}
}
}