From 13d1927840421a488cee26d5814007ff14e69feb Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 24 Nov 2022 11:11:36 +0700 Subject: [PATCH] clean up API logging --- tubearchivist/api/views.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tubearchivist/api/views.py b/tubearchivist/api/views.py index ea771f0..f21292e 100644 --- a/tubearchivist/api/views.py +++ b/tubearchivist/api/views.py @@ -43,7 +43,6 @@ class ApiBaseView(APIView): def get_document(self, document_id): """get single document from es""" path = f"{self.search_base}{document_id}" - print(path) response, status_code = ElasticWrap(path).get() try: self.response["data"] = SearchProcess(response).process() @@ -64,8 +63,6 @@ class ApiBaseView(APIView): def get_document_list(self, request, pagination=True): """get a list of results""" - print(self.search_base) - if pagination: self.initiate_pagination(request) @@ -437,7 +434,6 @@ class DownloadApiListView(ApiBaseView): @staticmethod def post(request): """add list of videos to download queue""" - print(f"request meta data: {request.META}") data = request.data try: to_add = data["data"] @@ -524,10 +520,7 @@ class TaskApiView(ApiBaseView): def post(self, request): """handle post request""" - - data = request.data - print(data) - response = TaskHandler(data).run_task() + response = TaskHandler(request.data).run_task() return Response(response) @@ -662,6 +655,6 @@ class SearchView(ApiBaseView): return Response( {"message": "no search query specified"}, status=400 ) - print("searching for: " + search_query) + search_results = SearchForm().multi_search(search_query) return Response(search_results)