Mineplex2018-withcommit/Website/LOC.Website.Web/Controllers/DominateController.cs

30 lines
848 B
C#
Raw Normal View History

2013-08-27 17:14:08 +02:00
namespace LOC.Website.Web.Controllers
{
using System.Web.Mvc;
using Common.Models;
using Core.Model.GameServer.Stats;
using Newtonsoft.Json;
public class DominateController : PvpController
{
private readonly IDominateAdministrator _dominateAdministrator;
public DominateController(IDominateAdministrator dominateAdministrator)
{
_dominateAdministrator = dominateAdministrator;
}
protected override IPvpAdministrator GetAdministrator()
{
return _dominateAdministrator;
}
[HttpPost]
public ContentResult UploadStats(DominateGameStatsToken token)
{
var json = JsonConvert.SerializeObject(_dominateAdministrator.UploadStats(token));
return Content(json, "application/json");
}
}
}