Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hepheir committed Aug 17, 2023
2 parents 99763e5 + ad9c862 commit fa5bc29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@

import json
import os

from datetime import timedelta
from pathlib import Path
from urllib.request import urlopen


# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down Expand Up @@ -117,7 +116,7 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'ENGINE': secrets['DATABASE_ENGINE'],
'NAME': secrets['DATABASE_NAME'],
'USER': secrets['DATABASE_USER'],
'PASSWORD': secrets['DATABASE_PASSWORD'],
Expand Down
5 changes: 2 additions & 3 deletions search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
@authentication_classes([JWTAuthentication])
class SearchView(APIView):
def get(self, request: HttpRequest):
try:
query = request.GET['query']
except KeyError:
query = request.GET.get('query', '').strip()
if not query:
return Response(status=HTTPStatus.BAD_REQUEST)
return Response(
status=HTTPStatus.OK,
Expand Down

0 comments on commit fa5bc29

Please sign in to comment.