fix task
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.http import JsonResponse
|
||||
from rest_framework import status
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from SubscribesApp.models import SubscribeForUser
|
||||
@@ -31,6 +31,6 @@ class SubscribersView(APIView):
|
||||
else:
|
||||
subscribe_for_user.update(auto_continue=False)
|
||||
|
||||
return Response("Subscriptions updated successfully", status=status.HTTP_200_OK)
|
||||
return JsonResponse({"message": "Subscriptions updated successfully"}, status=status.HTTP_200_OK)
|
||||
|
||||
return Response("User not found", status=status.HTTP_404_NOT_FOUND)
|
||||
return JsonResponse({"message": "User not found"}, status=status.HTTP_404_NOT_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user