Fixed offset bug in GetCachedPagePath for if you've read just one page. Fixed a bad refactor for getting files.
This commit is contained in:
parent
14e8c3b820
commit
c75feb03e1
5 changed files with 26 additions and 19 deletions
|
@ -158,15 +158,10 @@ namespace API.Controllers
|
|||
}
|
||||
|
||||
[HttpGet("series")]
|
||||
public async Task<ActionResult<IEnumerable<Series>>> GetSeriesForLibrary(int libraryId, bool forUser = false)
|
||||
public async Task<ActionResult<IEnumerable<Series>>> GetSeriesForLibrary(int libraryId)
|
||||
{
|
||||
int userId = 0;
|
||||
if (forUser)
|
||||
{
|
||||
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
|
||||
userId = user.Id;
|
||||
}
|
||||
return Ok(await _unitOfWork.SeriesRepository.GetSeriesDtoForLibraryIdAsync(libraryId, userId));
|
||||
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
|
||||
return Ok(await _unitOfWork.SeriesRepository.GetSeriesDtoForLibraryIdAsync(libraryId, user.Id));
|
||||
}
|
||||
|
||||
[Authorize(Policy = "RequireAdminRole")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue