Fix challonge event
Fix GenericController Fix ChallongeSave. Fix RestAPI in prod mode.
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using LaDOSE.Business.Interface;
|
||||
using LaDOSE.DTO;
|
||||
using LaDOSE.Entity;
|
||||
using LaDOSE.Entity.Wordpress;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -11,19 +13,24 @@ using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LaDOSE.Api.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
|
||||
//[Authorize]
|
||||
[Produces("application/json")]
|
||||
[Route("api/[controller]")]
|
||||
public class EventController : GenericController<IEventService, Event>
|
||||
public class EventController : GenericControllerDTO<IEventService, Event, EventDTO>
|
||||
{
|
||||
private IGameService _gameService;
|
||||
|
||||
public EventController(IEventService service,IGameService gameService) : base(service)
|
||||
public EventController(IMapper mapper, IEventService service,IGameService gameService) : base(mapper,service)
|
||||
{
|
||||
this._gameService = gameService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override List<EventDTO> Get()
|
||||
{
|
||||
return this._mapper.Map<List<EventDTO>>(_service.GetAll().OrderByDescending(e=>e.Date).ToList());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user