This commit is contained in:
@@ -17,8 +17,17 @@ namespace LaDOSE.Api.Controllers
|
||||
[Produces("application/json")]
|
||||
public class GameController : GenericControllerDTO<IGameService, Game, GameDTO>
|
||||
{
|
||||
public GameController(IMapper mapper,IGameService service) : base(mapper,service)
|
||||
private IExternalProviderService provider;
|
||||
public GameController(IMapper mapper,IGameService service, IExternalProviderService service2) : base(mapper,service)
|
||||
{
|
||||
provider = service2;
|
||||
}
|
||||
[HttpGet("smash/{name}")]
|
||||
public async Task<List<GameDTO>> GetIdFromSmash(string name)
|
||||
{
|
||||
var smashGame = await provider.GetSmashGame(name);
|
||||
|
||||
return _mapper.Map<List<GameDTO>>(smashGame);;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace LaDOSE.Api.Controllers
|
||||
|
||||
private IMapper _mapper;
|
||||
|
||||
// GET
|
||||
// GETawa
|
||||
public TournamentController(IMapper mapper, IExternalProviderService service)
|
||||
{
|
||||
_mapper = mapper;
|
||||
|
||||
@@ -24,6 +24,7 @@ using LaDOSE.Entity.Wordpress;
|
||||
using Result = LaDOSE.Entity.Challonge.Result;
|
||||
using LaDOSE.Entity.BotEvent;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace LaDOSE.Api
|
||||
{
|
||||
@@ -163,7 +164,7 @@ namespace LaDOSE.Api
|
||||
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
public void Configure(IApplicationBuilder app, IHostEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
//loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
//loggerFactory.AddDebug();
|
||||
|
||||
Reference in New Issue
Block a user