fix all
continuous-integration/drone/push Build is failing Details

Dave_Test_Api
David D'ALMEIDA 2 years ago
parent 7e119a10de
commit 5bd1f568dc

@ -4,25 +4,9 @@
{
public string? orderingPropertyName { get; set; } = null;
public bool? descending { get; set; } = false;
// const int maxPageSize = 50;
// public int PageNumber { get; set; } = 1;
public int index { get; set; } = 1;
public int index { get; set; } = 0;
public int count { get; set; } = 1;
/*
//max lentght
private int _pageSize;
public int PageSize
{
get
{
return _pageSize;
}
set
{
_pageSize = (value > maxPageSize) ? maxPageSize : value;
}
}*/
}
}

@ -12,6 +12,7 @@ namespace API_LoL_Project.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class RuneController : ControllerBase
{
public IRunesManager dataManager;
@ -28,7 +29,7 @@ namespace API_LoL_Project.Controllers
// GET: api/<RuneController>
/*// GET: api/<RuneController>
[HttpGet]
public async Task<ActionResult<IEnumerable<RuneDTO>>> GetAllRunes([FromQuery] Request.PageRequest request)
{
@ -75,6 +76,7 @@ namespace API_LoL_Project.Controllers
}
}
*/
// GET: api/<RuneController>
@ -110,8 +112,8 @@ namespace API_LoL_Project.Controllers
}
*/
*/
/*
[HttpGet("{name}")]
public async Task<ActionResult<LolResponce<RuneDTO>>> GetRuneByName(string name)
{
@ -146,7 +148,7 @@ namespace API_LoL_Project.Controllers
return BadRequest(e.Message);
}
}
}*/
/* // GET api/<RuneController>/5
[HttpGet("{id}")]

@ -54,7 +54,18 @@ namespace API_LoL_Project.Mapper
}
public static Champion ToModel(this ChampionFullDTO dto)
{
if (dto == null)
{
var message = string.Format("Champion cannot be empty");
/*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*/
throw new Exception(message);
}
return new(dto.Name);// dto.Class, dto.Icon,
}
public static Champion ToModel(this ChampionDTO dto)
{
if (dto == null)

@ -19,6 +19,10 @@ namespace DTO
[StringLength(60, ErrorMessage = "Name can't be longer than 60 characters")]*/
public string Name { get; set; }
public string Bio { get; set; }
/* public ClassChampionDto {get; set;}*/
/* public IconDto {get; set;}*/
public ReadOnlyDictionary<string, int> Characteristics { get; set; }
public ImageDTO LargeImage { get; set; }

Loading…
Cancel
Save