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

30 lines
925 B
C#

namespace LOC.Website.Web.Controllers
{
using System.Web.Mvc;
using Common.Models;
using Core.Model.Server.GameServer.CaptureThePig.Stats;
using Newtonsoft.Json;
public class CaptureThePigController : PvpController
{
private readonly ICaptureThePigAdministrator _captureThePigAdministrator;
public CaptureThePigController(ICaptureThePigAdministrator captureThePigAdministrator)
{
_captureThePigAdministrator = captureThePigAdministrator;
}
protected override IPvpAdministrator GetAdministrator()
{
return _captureThePigAdministrator;
}
[HttpPost]
public ContentResult UploadStats(CaptureThePigGameStatsToken token)
{
var json = JsonConvert.SerializeObject(_captureThePigAdministrator.UploadStats(token));
return Content(json, "application/json");
}
}
}