Skip to content

Commit

Permalink
refactor(user): 유저 프로필에 최신 게시물부터 정렬
Browse files Browse the repository at this point in the history
refactor(user): 유저 프로필에 최신 게시물부터 정렬
  • Loading branch information
BaekSeungW00 authored Aug 17, 2023
2 parents a1566b3 + 5595132 commit 47613c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get(self, request, user_id):
badges = Badge.objects.filter(id__in=badge_ids)
following_num = FollowedUser.objects.filter(followed_by=user).count()
follower_num = FollowedUser.objects.filter(user=user).count()
posts = Post.objects.filter(created_by=user)
posts = Post.objects.filter(created_by=user).order_by('-created_at')
serializer = UserSerializer(user)
data = {
"user": serializer.data,
Expand Down

0 comments on commit 47613c9

Please sign in to comment.