Enable response compression (br and gzip) for images and static assets. After we scan a library, kick of a cleanup of cache to ensure if archives were changed, the cache is cleared too.

This commit is contained in:
Joseph Milazzo 2021-03-12 10:37:42 -06:00
parent 2a8931406d
commit d3b42081cb
7 changed files with 82 additions and 14 deletions

View file

@ -35,9 +35,22 @@ namespace API.Data
{
return await _context.Chapter
.Include(c => c.Files)
.AsNoTracking()
.SingleOrDefaultAsync(c => c.Id == chapterId);
}
/// <summary>
/// Returns Chapters for a volume id.
/// </summary>
/// <param name="volumeId"></param>
/// <returns></returns>
public async Task<IList<Chapter>> GetChaptersAsync(int volumeId)
{
return await _context.Chapter
.Where(c => c.VolumeId == volumeId)
.ToListAsync();
}
public async Task<ChapterDto> GetChapterDtoAsync(int chapterId)
{