Skip to content

Commit

Permalink
Correct comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemarslan committed Nov 7, 2021
1 parent 9432c80 commit ded12fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions project/accounts/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ded12fd

Please sign in to comment.