1
0

final update

This commit is contained in:
Labality
2021-08-19 16:35:32 +07:00
parent c2e012237f
commit f4fa1d8085
11877 changed files with 1192560 additions and 0 deletions

View File

@ -0,0 +1,39 @@
namespace LOC.Website.Web.Controllers
{
using System.Web.Mvc;
using Common.Models;
using Core.Model.GameServer;
using Newtonsoft.Json;
public class ServerController : Controller
{
private readonly IServerAdministrator _serverAdministrator;
public ServerController(IServerAdministrator serverAdministrator)
{
_serverAdministrator = serverAdministrator;
}
[HttpPost]
public void Start(Server server)
{
_serverAdministrator.Started(server);
}
[HttpPost]
public ActionResult GetFilteredWords()
{
var json = JsonConvert.SerializeObject(_serverAdministrator.GetFilteredWords());
return Content(json, "application/json");
}
[HttpPost]
public ActionResult CheckForUpdates(ServerHistory server)
{
_serverAdministrator.UpdateServerStatus(server);
var serverUpdates = _serverAdministrator.GetServerUpdates(server.ServerId);
var json = JsonConvert.SerializeObject(serverUpdates);
return Content(json, "application/json");
}
}
}