Skip to content

Commit

Permalink
fix(api): support accept header in getBookPage (gotson#352)
Browse files Browse the repository at this point in the history
* fix(api): support accept header in getBookPage

API is documented as supporting `accept: image/*` in the HTTP request,
but doing so results in server response with the status 406.

This commit updates the `GetMapping` annotation to correctly support
these values in the HTTP `accept` header.

closes gotson#350

* fix: failing test

Co-authored-by: Gauthier Roebroeck <gauthier.roebroeck@gmail.com>
  • Loading branch information
grim7reaper and gotson committed Nov 2, 2020
1 parent ae5917e commit e123d38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class BookController(
@GetMapping(value = [
"api/v1/books/{bookId}/pages/{pageNumber}",
"opds/v1.2/books/{bookId}/pages/{pageNumber}"
])
], produces = [MediaType.ALL_VALUE])
@PreAuthorize("hasRole('$ROLE_PAGE_STREAMING')")
fun getBookPage(
@AuthenticationPrincipal principal: KomgaPrincipal,
Expand Down

0 comments on commit e123d38

Please sign in to comment.