diff --git a/backend/api/v1/views.py b/backend/api/v1/views.py index 7cbdafb..4fe8a2b 100644 --- a/backend/api/v1/views.py +++ b/backend/api/v1/views.py @@ -170,7 +170,7 @@ def get_queryset(self): return self.request.user.documents else: user = User.objects.get(id=1) - return Document.objects.get(owner=user) + return Document.objects.filter(owner=user) return Document.objects.none() def get_serializer_class(self): diff --git a/backend/request/documents.http b/backend/request/documents.http index 265bb6d..a40b568 100644 --- a/backend/request/documents.http +++ b/backend/request/documents.http @@ -1,10 +1,9 @@ @TOKEN = Token bb4f5dbedaafd2730f35803e7087e797479d68f5 -# @URL = https://documents-template.site/ -@URL = http://127.0.0.1:8000 +@URL = https://documents-template.site/ +# @URL = http://127.0.0.1:8000 ### -GET {{URL}}/api/documents/32/ -Content-Type: application/json +GET {{URL}}/api/documents/1 # Authorization: {{TOKEN}} {