Skip to content

Commit 4887ed5

Browse files
committed
fix quicksearch
Changes to be committed: modified: search/apis.py
1 parent 15e5a67 commit 4887ed5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

search/apis.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
from drf_yasg import openapi
44
from drf_yasg.utils import swagger_auto_schema
55
from rest_framework import status
6-
from authentication.services import CustomJSONWebTokenAuthentication
6+
from rest_framework.permissions import IsAuthenticated
77
from rest_framework.response import Response
8-
from rest_framework.permissions import AllowAny
98
from rest_framework.views import APIView
109
from search.selectors import search_db, controled_list
11-
from api.models import BCO
1210
from itertools import chain
1311

1412
class SearchObjectsAPI(APIView):
@@ -30,6 +28,7 @@ class SearchObjectsAPI(APIView):
3028
```
3129
"""
3230

31+
permission_classes = [IsAuthenticated]
3332
auth = openapi.Parameter('test', openapi.IN_QUERY, description="test manual param", type=openapi.TYPE_BOOLEAN)
3433

3534
@swagger_auto_schema(
@@ -73,8 +72,7 @@ def get(self, request) -> Response:
7372
"schema",
7473
"state",
7574
]
76-
77-
search = dict(self.request.GET)
75+
search = dict(request.GET)
7876
result = controled_list(request.user)
7977
for query, value in search.items():
8078
for item in value:

0 commit comments

Comments
 (0)