Started the refactoring so that there is a menu service to handle opening/closing the different drawers.
This commit is contained in:
parent
fc54f8571f
commit
4d4b3c7285
41 changed files with 4666 additions and 142 deletions
|
|
@ -159,8 +159,9 @@ public class BookController : BaseApiController
|
|||
{
|
||||
var ptocBookmarks =
|
||||
await _unitOfWork.UserTableOfContentRepository.GetPersonalToCForPage(User.GetUserId(), chapterId, page);
|
||||
var annotations = await _unitOfWork.UserRepository.GetAnnotations(User.GetUserId(), chapter.Id);
|
||||
|
||||
return Ok(await _bookService.GetBookPage(page, chapterId, path, baseUrl, ptocBookmarks));
|
||||
return Ok(await _bookService.GetBookPage(page, chapterId, path, baseUrl, ptocBookmarks, annotations));
|
||||
}
|
||||
catch (KavitaException ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -826,6 +826,18 @@ public class ReaderController : BaseApiController
|
|||
return _readerService.GetTimeEstimate(0, pagesLeft, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the annotations for the given chapter
|
||||
/// </summary>
|
||||
/// <param name="chapterId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("annotations")]
|
||||
public async Task<ActionResult<IEnumerable<AnnotationDto>>> GetAnnotations(int chapterId)
|
||||
{
|
||||
|
||||
return Ok(await _unitOfWork.UserRepository.GetAnnotations(User.GetUserId(), chapterId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the user's personal table of contents for the given chapter
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue