Skip to content

Commit

Permalink
Merge pull request #270 from bounswe/kaan/feed-update
Browse files Browse the repository at this point in the history
update feed
  • Loading branch information
berat-yilmaz authored May 16, 2024
2 parents babb1b4 + 0607c9f commit b4c9b40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/nba_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ def feed(request):
posts = Post.objects.filter(user=follow)
for post in posts:
post_ids.append(post.post_id)
post_ids = list(reversed(post_ids))
post_ids += [post.post_id for post in Post.objects.filter(user=user)]
#post_ids = list(post_ids.sort())
#post_ids = post_ids.sort(reverse=True)
post_ids.sort(reverse=True)
return JsonResponse({'post_ids': post_ids}, status=200)

#all_feed_posts = [Post.objects.filter(user=follow.user) for follow in following]
Expand Down

0 comments on commit b4c9b40

Please sign in to comment.