|
|
|
@ -80,10 +80,11 @@ namespace API_LoL.Controllers
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var champ = await RunesManager.GetItemsByName(rune.Name, 0, 1);
|
|
|
|
|
if (champ.FirstOrDefault() != null && champ.Count() != 0 && champ.FirstOrDefault().Name == rune.Name)
|
|
|
|
|
{
|
|
|
|
|
return Conflict(rune);
|
|
|
|
|
}
|
|
|
|
|
if(champ.Count() > 0)
|
|
|
|
|
if (champ.Where(c => c.Name == rune.Name).Count() == 1)
|
|
|
|
|
{
|
|
|
|
|
return Conflict(rune);
|
|
|
|
|
}
|
|
|
|
|
await RunesManager.AddItem(rune.ToRune());
|
|
|
|
|
return CreatedAtAction("Post", rune);
|
|
|
|
|
|
|
|
|
|