From 176f3eea6f81f98b8f01cc54d1894fdf3786d8e2 Mon Sep 17 00:00:00 2001 From: Jakub K Date: Mon, 22 Jan 2024 22:36:17 +0100 Subject: [PATCH] degubowanie --- jobposting/views.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jobposting/views.py b/jobposting/views.py index acc935d..6d362be 100644 --- a/jobposting/views.py +++ b/jobposting/views.py @@ -93,13 +93,17 @@ class GetAuthTokenView(APIView): authentication_classes = [] permission_classes = [] def post(self, request): + print("GET ID") client_id = settings.REACT_CLIENT_ID client_secret = settings.REACT_CLIENT_SECRET + print("GET SECRET") headers = {'Content-Type': 'application/x-www-form-urlencoded'} data = { - 'grant_type': 'client_credentials', - 'client_id': client_id, - 'client_secret': client_secret, + "grant_type": "client_credentials", + "client_id": client_id, + "client_secret": client_secret, + "redirect_uri": "http://izaac.izaac.pl/noexist/callback" } + print("DATA READY") response = requests.post('http://izaac.izaac.pl/o/token/', data=data, headers=headers) return Response(response.json()) \ No newline at end of file