should work

WORK-WEB-API
Kevin MONTEIRO 1 year ago
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);
}
}

@ -6,7 +6,6 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src WORKDIR /src
COPY ["HeartTrackAPI/HeartTrackAPI.csproj", "HeartTrackAPI/"] COPY ["HeartTrackAPI/HeartTrackAPI.csproj", "HeartTrackAPI/"]
COPY ["StubbedDtoLib/StubbedDtoLib.csproj", "StubbedDtoLib/"]
COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"] COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"]
COPY ["Shared/Shared.csproj", "Shared/"] COPY ["Shared/Shared.csproj", "Shared/"]
COPY ["Entities/Entities.csproj", "Entities/"] COPY ["Entities/Entities.csproj", "Entities/"]

Loading…
Cancel
Save