Refactored archive code into a service so that I can write tests for it.
This commit is contained in:
parent
07fd959b22
commit
6b76c8b211
22 changed files with 146 additions and 49 deletions
|
|
@ -129,10 +129,12 @@ namespace API.Data
|
|||
.Include(vol => vol.Files)
|
||||
.ProjectTo<VolumeDto>(_mapper.ConfigurationProvider)
|
||||
.SingleAsync(vol => vol.Id == volumeId);
|
||||
|
||||
|
||||
var volumeList = new List<VolumeDto>() {volume};
|
||||
await AddVolumeModifiers(userId, volumeList);
|
||||
|
||||
volumeList[0].Files = volumeList[0].Files.OrderBy(f => f.Chapter).ToList();
|
||||
|
||||
return volumeList[0];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue