-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add top article feature #385
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
정책적 결정
|
retroinspect
previously requested changes
May 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정렬 로직 추가하고 테스트 작성하면 될 듯 합니다
retroinspect
approved these changes
Jul 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
injoonH
force-pushed
the
feat/top-articles
branch
from
July 2, 2023 13:03
be832c3
to
0551fec
Compare
injoonH
force-pushed
the
feat/top-articles
branch
from
July 2, 2023 13:07
0551fec
to
7f51f7e
Compare
injoonH
force-pushed
the
feat/top-articles
branch
from
July 2, 2023 13:18
9ab72bb
to
f53e72d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
게시판을 불러오는 방식
(Top Articles): GET
/articles/top/
(Others): GET
/articles/?parent_board=<id>
핫 게시물이 되는 조건
boards
table에 좋아요 개수 threshold field 추가 후 넘었는지 여부로 평가threshold
넘지 않았어도 어드민 페이지에서 인기글로 수정 가능합니다.Model
Article
topped_at
field를 추가하였습니다.Board
top_threshold
field를 추가하였습니다.Article.update_vote_status()
vote가 업데이트될 때 1. 기존에 인기글이 아니었고 2. 좋아요 개수가 threshold 개수를 넘었다면 인기글로 전환합니다. (전환 시각을 저장합니다.)
Viewset
ArticleViewSet