Refactored ScanLibrary to accept and library id rather than DTO. Refactored ScanLibrary to use Task.Run() rather than having synchronous repo methods.

This commit is contained in:
Joseph Milazzo 2021-01-02 12:48:48 -06:00
parent 9168e12483
commit 7b1714349d
9 changed files with 44 additions and 75 deletions

View file

@ -27,13 +27,13 @@ namespace API.Controllers
[HttpGet("{seriesId}")]
public async Task<ActionResult<SeriesDto>> GetSeries(int seriesId)
{
return Ok(await _seriesRepository.GetSeriesByIdAsync(seriesId));
return Ok(await _seriesRepository.GetSeriesDtoByIdAsync(seriesId));
}
[HttpGet("volumes")]
public async Task<ActionResult<IEnumerable<VolumeDto>>> GetVolumes(int seriesId)
{
return Ok(await _seriesRepository.GetVolumesAsync(seriesId));
return Ok(await _seriesRepository.GetVolumesDtoAsync(seriesId));
}
}
}