Refactored the setContinuePoint code from the UI to the backend. Now, through an API, we can get the chapter to restart from. (#973)
This commit is contained in:
parent
3eb494dff4
commit
218f642870
7 changed files with 281 additions and 59 deletions
|
|
@ -356,6 +356,19 @@ namespace API.Controllers
|
|||
return BadRequest("Could not save progress");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Continue point is the chapter which you should start reading again from. If there is no progress on a series, then the first chapter will be returned (non-special unless only specials).
|
||||
/// Otherwise, loop through the chapters and volumes in order to find the next chapter which has progress.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("continue-point")]
|
||||
public async Task<ActionResult<ChapterDto>> GetContinuePoint(int seriesId)
|
||||
{
|
||||
var userId = await _unitOfWork.UserRepository.GetUserIdByUsernameAsync(User.GetUsername());
|
||||
|
||||
return Ok(await _readerService.GetContinuePoint(seriesId, userId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of bookmarked pages for a given Chapter
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue