-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature: Post Create, Read 기능 구현 #42
Conversation
e.getMessage(), | ||
ErrorCode.INTERNAL_SERVER_ERROR.getCode())); | ||
.status(errorCode.getHttpStatus()) | ||
.body(ErrorResponse.of(errorCode, message)); |
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.
에러 메시지에서 Stack trace가 포함되는 걸 다듬어 주셔서 감사합니다!
import java.util.Arrays; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
|
||
public enum OriginType { | ||
TEXT("text"), | ||
VOICE("voice"); |
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.
채팅 목록 업로드와 기본 텍스트는 타입이 분리되어야 할 듯 싶습니다.
CHAT 타입을 추가할게요.
VOICE("voice"); | |
TEXT("text") | |
VOICE("voice"), | |
CHAT("chat"); |
import aimo.backend.domains.post.entity.Post; | ||
|
||
public class PostMapper { | ||
|
||
private final static int PREVIEW_CONTENT_LENGTH = 90; |
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.
인기글의 UI가 넓어서 다른 글의 PREVIEW와는 다른 값이 설정돼야 할 듯 싶습니다.
인기글은 90개, 다른 글들은 21개로 설정해 놓겠습니다.
} | ||
|
||
// PostType으로 글 조회 | ||
public Page<FindPostsByPostTypeResponse> findPostDtosByPostType(Member member, PostType postType, Integer page, Integer size) { |
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.
컨트롤러에서 서비스로 넘길 때 Entity를 그대로 넘기는 건 위험해 보입니다.
개별 DTO를 만들어서 전달하도록 수정하겠습니다.
issue
구현한 것
수정한 점
아쉬운 점