IW4M-Admin/WebfrontCore/Controllers/API/EventController.cs

22 lines
537 B
C#
Raw Normal View History

2018-04-08 02:44:42 -04:00
using SharedLibraryCore.Dtos;
2018-03-09 03:01:12 -05:00
using System.Collections.Generic;
2018-04-08 02:44:42 -04:00
using Microsoft.AspNetCore.Mvc;
2018-03-09 03:01:12 -05:00
namespace WebfrontCore.Controllers.API
{
public class EventController : APIController
{
[HttpGet]
[Route("event")]
public ActionResult Index()
{
var events = Manager.GetEventApi().GetEvents();
2018-04-08 02:44:42 -04:00
var eventsDto = new List<EventInfo>();
2018-03-09 03:01:12 -05:00
while (events.Count > 0)
eventsDto.Add(events.Dequeue());
return Json(eventsDto);
}
}
}