Merge pull request #539 from adityachandelgit/develop

Merge Develop into Master for Release
This commit is contained in:
Aditya Chandel
2025-06-19 15:05:41 -06:00
committed by GitHub
2 changed files with 1 additions and 4 deletions
@@ -17,13 +17,12 @@ public class CbxReaderController {
private final CbxReaderService cbxReaderService;
@CheckBookAccess(bookIdParam = "bookId")
@GetMapping("/{bookId}/pages")
public List<Integer> listPages(@PathVariable Long bookId) {
return cbxReaderService.getAvailablePages(bookId);
}
@CheckBookAccess(bookIdParam = "bookId")
@GetMapping("/{bookId}/pages/{pageNumber}")
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
@@ -21,13 +21,11 @@ public class PdfReaderController {
private final PdfReaderService pdfReaderService;
@GetMapping("/{bookId}/pages")
@CheckBookAccess(bookIdParam = "bookId")
public List<Integer> listPages(@PathVariable Long bookId) throws IOException {
return pdfReaderService.getAvailablePages(bookId);
}
@GetMapping("/{bookId}/pages/{pageNumber}")
@CheckBookAccess(bookIdParam = "bookId")
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
pdfReaderService.streamPageImage(bookId, pageNumber, response.getOutputStream());