Fixes formatting isbn endpoint results
This commit is contained in:
parent
22af7ece71
commit
8c4cafed79
4 changed files with 11 additions and 11 deletions
|
@ -17,7 +17,9 @@ class Isbn(View):
|
|||
book_results = book_search.isbn_search(isbn)
|
||||
|
||||
if is_api_request(request):
|
||||
return JsonResponse([r.json() for r in book_results], safe=False)
|
||||
return JsonResponse(
|
||||
[book_search.format_search_result(r) for r in book_results], safe=False
|
||||
)
|
||||
|
||||
paginated = Paginator(book_results, PAGE_LENGTH).get_page(
|
||||
request.GET.get("page")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue