Show time passed since ban instead of "forever"

reworked event api to include all events (sans unknown)
This commit is contained in:
RaidMax
2018-06-16 21:11:25 -05:00
parent 5be6b75ccf
commit e7c7145da1
19 changed files with 861 additions and 128 deletions

View File

@ -9,13 +9,10 @@ namespace WebfrontCore.Controllers.API
{
[HttpGet]
[Route("event")]
public ActionResult Index()
public ActionResult Index(bool shouldConsume = true)
{
var events = Manager.GetEventApi().GetEvents();
var eventsDto = new List<EventInfo>();
while (events.Count > 0)
eventsDto.Add(events.Dequeue());
return Json(eventsDto);
var events = Manager.GetEventApi().GetEvents(shouldConsume);
return Json(events);
}
}
}