-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BE] 아티클에 대표이미지를 추가한다. #612
Conversation
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.
고생하셨습니닷
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.
수고하셨습니다~ 👍
@GetMapping("/articles/latest") | ||
public ResponseEntity<ArticlesPreviewResponse> readLatestArticles() { | ||
return ResponseEntity.ok(articleService.readLatestArticles()); | ||
@GetMapping("/articles/detail") |
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.
전의 명명이 더 나은 것 같은데 바꾼 이유가 궁금해요!
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.
- 모든 아티클 조회 API가 최신순으로 불러오기 때문에 latest가 불필요하다고 생각했습니다!
- 일반 목록과 디테일 목록의 엔드포인트를 명확히 분리해주고 싶었습니다!
public ResponseEntity<ArticlesPreviewResponse> readLatestArticles() { | ||
return ResponseEntity.ok(articleService.readLatestArticles()); | ||
@GetMapping("/articles/detail") | ||
public ResponseEntity<ArticlesDetailPreviewResponse> readArticlesDetail() { |
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.
Detail과 Preview는 반대되는 개념이라고 생각하는데요,, 일반 목록과 디테일 목록이 어떻게 다른거죠?-?
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.
저도 detail 명명이 하나를 세부적으로 본다는 것으로 느껴져서 preview와는 대치되는 개념이라 느껴져요!
Partial 등 일부분을 뜻하는 용어를 사용하거나 List 명명을 선택하는 것이 좋을 듯합니다
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.
DTO 명 수정해주었습니다!
public ArticlesDetailPreviewResponse readArticles() { | ||
List<ArticleDetailPreviewResponse> articles = articleRepository.findAll().stream() | ||
public ArticlesDetailPreviewResponse readArticleDetailPreviews() { | ||
List<ArticleDetailPreviewResponse> articles = articleRepository.findLatest().stream() |
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.
List<ArticleDetailPreviewResponse> articles = articleRepository.findLatest().stream() | |
List<ArticleDetailPreviewResponse> articles = articleRepository.findLatestArticles().stream() |
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.
반영했습니다!
…ng-ggood into feat/601-article-thumbnail2 merge dev-be
904a82a
to
d65b273
Compare
❗ Issue
✨ 구현한 기능
아티클 내 thumbnail 추가
DB 구조 변경
📢 논의하고 싶은 내용
API 엔드포인트 바꿨는데 괜찮은지 한번 봐주세요~
🎸 기타