Merge pull request #539 from adityachandelgit/develop
Merge Develop into Master for Release
This commit is contained in:
+1
-2
@@ -17,13 +17,12 @@ public class CbxReaderController {
|
|||||||
|
|
||||||
private final CbxReaderService cbxReaderService;
|
private final CbxReaderService cbxReaderService;
|
||||||
|
|
||||||
@CheckBookAccess(bookIdParam = "bookId")
|
|
||||||
@GetMapping("/{bookId}/pages")
|
@GetMapping("/{bookId}/pages")
|
||||||
public List<Integer> listPages(@PathVariable Long bookId) {
|
public List<Integer> listPages(@PathVariable Long bookId) {
|
||||||
return cbxReaderService.getAvailablePages(bookId);
|
return cbxReaderService.getAvailablePages(bookId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CheckBookAccess(bookIdParam = "bookId")
|
|
||||||
@GetMapping("/{bookId}/pages/{pageNumber}")
|
@GetMapping("/{bookId}/pages/{pageNumber}")
|
||||||
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
|
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
|
||||||
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
|
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
|
||||||
|
|||||||
-2
@@ -21,13 +21,11 @@ public class PdfReaderController {
|
|||||||
private final PdfReaderService pdfReaderService;
|
private final PdfReaderService pdfReaderService;
|
||||||
|
|
||||||
@GetMapping("/{bookId}/pages")
|
@GetMapping("/{bookId}/pages")
|
||||||
@CheckBookAccess(bookIdParam = "bookId")
|
|
||||||
public List<Integer> listPages(@PathVariable Long bookId) throws IOException {
|
public List<Integer> listPages(@PathVariable Long bookId) throws IOException {
|
||||||
return pdfReaderService.getAvailablePages(bookId);
|
return pdfReaderService.getAvailablePages(bookId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/{bookId}/pages/{pageNumber}")
|
@GetMapping("/{bookId}/pages/{pageNumber}")
|
||||||
@CheckBookAccess(bookIdParam = "bookId")
|
|
||||||
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
|
public void getPage(@PathVariable Long bookId, @PathVariable int pageNumber, HttpServletResponse response) throws IOException {
|
||||||
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
|
response.setContentType(MediaType.IMAGE_JPEG_VALUE);
|
||||||
pdfReaderService.streamPageImage(bookId, pageNumber, response.getOutputStream());
|
pdfReaderService.streamPageImage(bookId, pageNumber, response.getOutputStream());
|
||||||
|
|||||||
Reference in New Issue
Block a user