1
0
Fork 0

Updates tests

This commit is contained in:
Mouse Reeve 2022-08-05 08:56:24 -07:00
parent ed71b791c9
commit b4cfda0587
2 changed files with 32 additions and 9 deletions

View file

@ -27,6 +27,9 @@ class Search(View):
return api_book_search(request)
query = request.GET.get("q")
if not query:
return TemplateResponse(request, "search/book.html")
search_type = request.GET.get("type")
if query and not search_type:
search_type = "user" if "@" in query else "book"