Very messy code that implements read status tracking. Needs major cleanup.

This commit is contained in:
Joseph Milazzo 2021-01-17 15:05:27 -06:00
parent e0d70d16f9
commit effdf07cef
24 changed files with 2179 additions and 24 deletions

View file

@ -147,8 +147,13 @@ namespace API.Controllers
}
[HttpGet("series")]
public async Task<ActionResult<IEnumerable<Series>>> GetSeriesForLibrary(int libraryId)
public async Task<ActionResult<IEnumerable<Series>>> GetSeriesForLibrary(int libraryId, bool forUser = false)
{
if (forUser)
{
var user = await _userRepository.GetUserByUsernameAsync(User.GetUsername());
return Ok(await _seriesRepository.GetSeriesDtoForLibraryIdAsync(libraryId, user.Id));
}
return Ok(await _seriesRepository.GetSeriesDtoForLibraryIdAsync(libraryId));
}