Start of the Structure of event not tied to Challonge or smash.

Lads und Canzer \o>
This commit is contained in:
2022-03-20 02:59:48 +01:00
parent ab02d292da
commit 87c9883245
22 changed files with 709 additions and 445 deletions

View File

@@ -18,12 +18,12 @@ namespace LaDOSE.Api.Controllers
public class SmashController : Controller
{
private ITournamentService _service;
private IEventService _service;
private IMapper _mapper;
// GET
public SmashController(IMapper mapper, ITournamentService service)
public SmashController(IMapper mapper, IEventService service)
{
_mapper = mapper;
_service = service;
@@ -36,6 +36,7 @@ namespace LaDOSE.Api.Controllers
{
if (!String.IsNullOrEmpty(tournamentSlug))
{
var tournaments = await _service.GetSmashResult(tournamentSlug);
return Ok(tournaments);
@@ -43,8 +44,19 @@ namespace LaDOSE.Api.Controllers
return null;
}
[HttpGet("AddTournament/{tournamentSlug}")]
public async Task<IActionResult> AddSmashTournament(string tournamentSlug)
{
if (!String.IsNullOrEmpty(tournamentSlug))
{
var tournaments = await _service.GetSmashResult2(tournamentSlug);
return Ok(tournaments);
}
return null;
}
}
}