Updates other calls to the search endpoint
This commit is contained in:
@ -4,7 +4,7 @@ from django.http import JsonResponse
|
||||
from django.template.response import TemplateResponse
|
||||
from django.views import View
|
||||
|
||||
from bookwyrm.connectors import connector_manager
|
||||
from bookwyrm import book_search
|
||||
from bookwyrm.settings import PAGE_LENGTH
|
||||
from .helpers import is_api_request
|
||||
|
||||
@ -14,7 +14,7 @@ class Isbn(View):
|
||||
|
||||
def get(self, request, isbn):
|
||||
"""info about a book"""
|
||||
book_results = connector_manager.isbn_local_search(isbn)
|
||||
book_results = book_search.isbn_search(isbn)
|
||||
|
||||
if is_api_request(request):
|
||||
return JsonResponse([r.json() for r in book_results], safe=False)
|
||||
|
Reference in New Issue
Block a user