Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 3 additions & 4 deletions backend/request/documents.http
Original file line number Diff line number Diff line change
@@ -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}}

{
Expand Down