Skip to content

Commit

Permalink
Feat: 메인에서 보여주는 레시피 4개는 최신순으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
newbission committed Jun 19, 2024
1 parent b6e3bab commit 28aec4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_category_recipes(self, user_id, category_id):
category_recipes = Recipe.objects.filter(category=category_id).annotate(
likes_count=Count("like", distinct=True),
bookmarks_count=Count("bookmark", distinct=True),
)[:4]
).order_by("-id")[:4]

# 각 레시피에 대해 사용자의 좋아요 및 북마크 상태를 설정
for recipe in category_recipes:
Expand Down

0 comments on commit 28aec4e

Please sign in to comment.