|
|
|
@ -18,8 +18,12 @@ namespace API_LoL.Controllers
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<IActionResult> Get()
|
|
|
|
|
{
|
|
|
|
|
var list = await ChampionsManager.GetItems(0,await ChampionsManager.GetNbItems());
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
var list = await ChampionsManager.GetItems(0,await ChampionsManager.GetNbItems());
|
|
|
|
|
if (list.Count<Champion>() == 0) {
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
}else {
|
|
|
|
|
return NoContent();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GET api/<ChampionController>/5
|
|
|
|
|