diff --git a/authors/apps/appnotifications/views.py b/authors/apps/appnotifications/views.py index 66658f1..73a3e52 100644 --- a/authors/apps/appnotifications/views.py +++ b/authors/apps/appnotifications/views.py @@ -29,6 +29,13 @@ def update(self, request, *args, **kwargs): serializer.is_valid(raise_exception=True) serializer.save() return Response(serializer.data, status=status.HTTP_200_OK) + + def get(self, request, *args, **kwargs): + user = UserNotification.objects.get(user=request.user) + if user: + serializer = self.serializer_class(user, many=False) + print(serializer.data) + return Response(serializer.data, status=status.HTTP_200_OK) class UnsubscribeEmailAPIView(GenericAPIView):