final update
This commit is contained in:
28
Website/LOC.Website.Web/Controllers/ServersController.cs
Normal file
28
Website/LOC.Website.Web/Controllers/ServersController.cs
Normal file
@ -0,0 +1,28 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user