|
|
|
@ -34,14 +34,14 @@ namespace API_LoL.Controllers
|
|
|
|
|
var list = await ChampionsManager.GetItemsByName(name, index,size);
|
|
|
|
|
if (list.Count() != 0)
|
|
|
|
|
{
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
return Ok(list.Select(champion => champion?.ToDTO()));
|
|
|
|
|
}
|
|
|
|
|
else { return NoContent(); }
|
|
|
|
|
}else if(!string.IsNullOrEmpty(skill)) {
|
|
|
|
|
var list = await ChampionsManager.GetItemsBySkill(skill, index, size);
|
|
|
|
|
if (list.Count() != 0)
|
|
|
|
|
{
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
return Ok(list.Select(champion => champion?.ToDTO()));
|
|
|
|
|
}
|
|
|
|
|
else { return NoContent(); }
|
|
|
|
|
}
|
|
|
|
@ -49,7 +49,7 @@ namespace API_LoL.Controllers
|
|
|
|
|
var list = await ChampionsManager.GetItems(index, size);
|
|
|
|
|
if (list.Count() != 0)
|
|
|
|
|
{
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
return Ok(list.Select(champion => champion?.ToDTO()));
|
|
|
|
|
}
|
|
|
|
|
else { return NoContent(); }
|
|
|
|
|
}
|
|
|
|
@ -57,7 +57,7 @@ namespace API_LoL.Controllers
|
|
|
|
|
var list = await ChampionsManager.GetItems(index, size);
|
|
|
|
|
if (list.Count() != 0)
|
|
|
|
|
{
|
|
|
|
|
return Ok(list.Select(champion => champion?.toDTO()));
|
|
|
|
|
return Ok(list.Select(champion => champion?.ToDTO()));
|
|
|
|
|
}
|
|
|
|
|
else { return NoContent(); }
|
|
|
|
|
}
|
|
|
|
|