Open
Conversation
added 9 commits
June 4, 2024 01:36
daheeParkk
reviewed
Jun 4, 2024
Comment on lines
+10
to
+11
| Member_IsNull(400, "유저가 존재하지 않습니다."), | ||
| Board_NotNullName(400, "'name' 값이 Null이 될 수 없습니다."), |
There was a problem hiding this comment.
카멜케이스와 스네이크케이스를 섞어 사용하는 것 보다 ExceptionType을 domain별로 나누는 건 어떨까요?
Comment on lines
+32
to
+39
| public ArticleResponse create(ArticleCreateRequest request) throws HTTPApiException { | ||
| if(request.authorId()==null) throw new HTTPApiException(ExceptionType.Article_NotNullAuthorId); | ||
| if(request.boardId()==null) throw new HTTPApiException(ExceptionType.Article_NotNullBoardId); | ||
| if(request.title()==null) throw new HTTPApiException(ExceptionType.Article_NotNullTitle); | ||
| if(request.description()==null) throw new HTTPApiException(ExceptionType.Article_NotNullDescription); | ||
| if(!articleservice.isExistBoard(request.boardId())) throw new HTTPApiException(ExceptionType.Board_IsNull); | ||
| if(!articleservice.isExistUser(request.authorId())) throw new HTTPApiException(ExceptionType.Member_IsNull); | ||
| return articleservice.create(request); |
daheeParkk
reviewed
Jun 26, 2024
Comment on lines
2
to
6
| datasource: | ||
| url: jdbc:mysql://localhost:3306/bcsd # 본인의 환경에 맞게 수정한다. | ||
| username: root # 본인의 환경에 맞게 수정한다. | ||
| password: qwer1234 # 본인의 환경에 맞게 수정한다. | ||
| password: 1234 # 본인의 환경에 맞게 수정한다. | ||
| driver-class-name: com.mysql.cj.jdbc.Driver |
| @@ -79,4 +79,12 @@ public ArticleResponse update(Long id, ArticleUpdateRequest request) { | |||
| public void delete(Long id) { | |||
| } | ||
|
|
||
| public boolean isExistEmail(Long notthis, String email) { | ||
| System.out.println("a"); |
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.
No description provided.