Skip to content

Commit 51cdeed

Browse files
committed
Add authorization to index view
1 parent b2e755d commit 51cdeed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Prompts(APIView):
1818

1919
def get(self, request):
2020
"""Index Request"""
21-
prompts = Prompt.objects.all()
21+
prompts = Prompt.objects.filter(owner=request.user.id)
2222
data = PromptSerializer(prompts, many=True).data
2323
return Response({"prompt": data})
2424
# prompts = Prompt.objects.filter(owner=request.user.id)

0 commit comments

Comments
 (0)