mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-21 15:16:33 -04:00
Very messy code that implements read status tracking. Needs major cleanup.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user