Very messy code that implements read status tracking. Needs major cleanup.
This commit is contained in:
parent
e0d70d16f9
commit
effdf07cef
24 changed files with 2179 additions and 24 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue