diff --git a/rest_auth/registration/views.py b/rest_auth/registration/views.py index 41ca856..e5eab5b 100644 --- a/rest_auth/registration/views.py +++ b/rest_auth/registration/views.py @@ -77,7 +77,7 @@ class VerifyEmailView(APIView, ConfirmEmailView): self.kwargs['key'] = serializer.validated_data['key'] confirmation = self.get_object() confirmation.confirm(self.request) - return Response({'message': _('ok')}, status=status.HTTP_200_OK) + return Response({'detail': _('ok')}, status=status.HTTP_200_OK) class SocialLoginView(LoginView): diff --git a/rest_auth/views.py b/rest_auth/views.py index 8420c32..499b561 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -108,7 +108,7 @@ class LogoutView(APIView): logout(request) - return Response({"success": _("Successfully logged out.")}, + return Response({"detail": _("Successfully logged out.")}, status=status.HTTP_200_OK) @@ -149,7 +149,7 @@ class PasswordResetView(GenericAPIView): serializer.save() # Return the success message with OK HTTP status return Response( - {"success": _("Password reset e-mail has been sent.")}, + {"detail": _("Password reset e-mail has been sent.")}, status=status.HTTP_200_OK ) @@ -170,7 +170,7 @@ class PasswordResetConfirmView(GenericAPIView): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save() - return Response({"success": _("Password has been reset with the new password.")}) + return Response({"detail": _("Password has been reset with the new password.")}) class PasswordChangeView(GenericAPIView): @@ -188,4 +188,4 @@ class PasswordChangeView(GenericAPIView): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save() - return Response({"success": _("New password has been saved.")}) + return Response({"detail": _("New password has been saved.")})