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()
|
|
|
|
|
{
|
2018-04-08 14:48:40 -04:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|