From 0475c848326f8970c5071b09874ea71993f531e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=BChler=20Ma=C3=ABlys?= Date: Sun, 21 Apr 2024 10:29:17 +0200 Subject: [PATCH] change authentification error code --- api/masteriqapp/views/AuthenticationView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/masteriqapp/views/AuthenticationView.py b/api/masteriqapp/views/AuthenticationView.py index a426a78..b6a37fb 100644 --- a/api/masteriqapp/views/AuthenticationView.py +++ b/api/masteriqapp/views/AuthenticationView.py @@ -51,7 +51,7 @@ def token(self, request): 'token': token.key, 'expires': expiring_date }) - return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) + return Response(serializer.errors, status=status.HTTP_401_UNAUTHORIZED) def create_iq_objects_for_new_user(self, user): categories = self.category_model.objects.all()