parent
7b02c1c5f5
commit
194afb089d
@ -1,26 +0,0 @@
|
||||
using Dto;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Shared;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/athletes")]
|
||||
public class AthletesController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<AthletesController> _logger;
|
||||
IAthleteService _stubbedDto;
|
||||
private const int DEFAULT_INDEX = 0, DEFAULT_COUNT = 5;
|
||||
|
||||
public AthletesController(ILogger<AthletesController> logger, IAthleteService athletesService)
|
||||
{
|
||||
_logger = logger;
|
||||
_stubbedDto = athletesService;
|
||||
}
|
||||
|
||||
[HttpGet("all")]
|
||||
[ProducesResponseType(typeof(IEnumerable<AthleteDto>), 200)]
|
||||
public async Task<IActionResult> GetAllAthletesAsync()
|
||||
{
|
||||
var athletes = await _stubbedDto.GetAllAthletesAsync();
|
||||
return Ok(athletes);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue