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

23 lines
555 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
using WebfrontCore.Application.API;
namespace WebfrontCore.Controllers.API
{
public class EventController : APIController
{
[HttpGet]
[Route("event")]
public ActionResult Index()
{
var events = EventAPI.Events;
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);
}
}
}