[3주차] 이은표/[feat] 게시글 도메인 API구현#116
Open
vyfhfhd wants to merge 4 commits intoLeets-Official:이은표/mainfrom
Hidden character warning
The head ref may contain hidden characters: "\uc774\uc740\ud45c/3\uc8fc\ucc28"
Open
Conversation
kangyeson
reviewed
Apr 9, 2026
|
|
||
| private final UserRepository userRepository; | ||
|
|
||
| @PostMapping |
There was a problem hiding this comment.
테스트용으로 CreateUser API도 같이 구현하신거 좋습니다!
| public class ForbiddenPostAccessException extends RuntimeException { | ||
|
|
||
| public ForbiddenPostAccessException() { | ||
| super("본인이 작성한 게시글만 수정 또는 삭제할 수 있습니다."); |
There was a problem hiding this comment.
에러마다 예외처리를 하기 보다, Post도메인의 공통 예외처리부분을 만들어두고 에러코드를 ENUM으로 관리하면 더 효율적이고 깔끔하게 관리할 수 있을 것 같습니다!
KunHeeLee7
reviewed
Apr 9, 2026
There was a problem hiding this comment.
👍에러 상황들을 ErrorCode Enum으로 모아서 관리하신 점이 인상 깊어요! 덕분에 유지보수도 편하고, 클라이언트에게 전달되는 정보도 더 풍부해지는 것 같습니다.
Comment on lines
+15
to
+16
| public static <T> ApiResponse<T> success(T result) { | ||
| return new ApiResponse<>(true, "SUCCESS", "요청에 성공했습니다.", result); |
There was a problem hiding this comment.
🛠️ 우리가 맞춘 명세서 규칙대로 성공 코드도 POST200_1 같은 형식으로 수정해주시면 프론트에서 처리하기 더 좋을 것 같아요!
Nanajun22
reviewed
Apr 9, 2026
| } | ||
|
|
||
| public static ApiResponse<?> fail(String code, String message) { | ||
| return new ApiResponse<>(false, code, message, null); |
There was a problem hiding this comment.
에러 상황 같은 경우 data 가 null로 반환 되니까 정적 팩토리 메서드를 ApiResponse 타입을 리턴하도록 하면 좋을 것 같습니다.
This file contains hidden or 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
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.
1. 과제 요구사항 중 구현한 내용
2. 핵심 변경 사항
3. 실행 및 검증 결과
특정 게시글 상세 조회 - 실패

자신이 작성한 게시글 수정 - 실패

자신이 작성한 게시글 삭제 - 실패

4. 완료 사항
5. 추가 사항
closed #이슈번호#119
제출 체크리스트
{이름}/main브랜치다{이름}/{숫자}주차브랜치다Reviewer 참고