Refactored volume to contain pages and removed /reader/info API endpoint.

This commit is contained in:
Joseph Milazzo 2021-01-11 17:36:11 -06:00
parent c2b41b774a
commit 28ce2bbba1
9 changed files with 571 additions and 18 deletions

View file

@ -84,6 +84,15 @@ namespace API.Data
.SingleOrDefaultAsync(vol => vol.Id == volumeId);
}
public async Task<VolumeDto> GetVolumeDtoAsync(int volumeId)
{
return await _context.Volume
.Where(vol => vol.Id == volumeId)
.Include(vol => vol.Files)
.ProjectTo<VolumeDto>(_mapper.ConfigurationProvider)
.SingleAsync(vol => vol.Id == volumeId);
}
/// <summary>
/// Returns all volumes that contain a seriesId in passed array.
/// </summary>