IW4M-Admin/WebfrontCore/Controllers/API/EventController.cs
RaidMax 6d5c368954 Seperated the application back into a seperate project
webfront is just a library now
2018-04-08 13:48:40 -05:00

22 lines
537 B
C#

using SharedLibraryCore.Dtos;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
namespace WebfrontCore.Controllers.API
{
public class EventController : APIController
{
[HttpGet]
[Route("event")]
public ActionResult Index()
{
var events = Manager.GetEventApi().GetEvents();
var eventsDto = new List<EventInfo>();
while (events.Count > 0)
eventsDto.Add(events.Dequeue());
return Json(eventsDto);
}
}
}