From ded12fdbd46480697e29f92fae812444d55b1d7b Mon Sep 17 00:00:00 2001 From: gorkemarslan Date: Sun, 7 Nov 2021 15:40:45 +0300 Subject: [PATCH] Correct comments --- project/accounts/api.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/project/accounts/api.py b/project/accounts/api.py index e7dc50d06..3a8b25af0 100644 --- a/project/accounts/api.py +++ b/project/accounts/api.py @@ -36,12 +36,12 @@ class ProfileViewSet(ModelViewSet): """ - REST API viewset for an Profile + REST API ViewSet for an Profile retrieve: Return the given user based a username. list: - Return a list of all the existing users. Only with privileged access. + Return a list of all the existing user profile. Only with privileged access. """ queryset = Profile.objects.all() @@ -71,7 +71,7 @@ def retrieve(self, request, user__username=None): @action(detail=True) def civis(self, request, user__username=None): """ - Gets the civis of the selected account + Gets the civis of the selected user account /accounts/{username}/civis """ user = get_object_or_404(get_user_model(), username=user__username) @@ -82,7 +82,7 @@ def civis(self, request, user__username=None): @action(detail=True) def followers(self, request, user__username=None): """ - Gets the followers of the selected account + Gets the followers of the selected user account /accounts/{username}/followers """ profile = get_account(username=user__username) @@ -93,7 +93,7 @@ def followers(self, request, user__username=None): @action(detail=True) def following(self, request, user__username=None): """ - Gets the followings of the selected account + Gets the followings of the selected user account /accounts/{username}/following """ profile = get_account(username=user__username) @@ -104,7 +104,7 @@ def following(self, request, user__username=None): @action(detail=True) def categories(self, request, user__username=None): """ - Gets the preferred categories of the selected account + Gets the preferred categories of the selected user account /accounts/{username}/categories """ profile = get_account(username=user__username) @@ -115,8 +115,8 @@ def categories(self, request, user__username=None): @action(detail=True) def threads(self, request, user__username=None): """ - Gets the preferred categories of the selected account - /accounts/{username}/categories + Gets the published threads of the selected user account + /accounts/{username}/threads """ user = get_user_model().objects.get(username=user__username) published_threads = Thread.objects.filter(author=user, is_draft=False)