-
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
refactor: letter패키지 정리하기 #513
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
094746f
refactor: letterlog 패치지 제거 및 letter와 합치기
chaewon121 56dca80
refactor: enum값 converter 기능으로 리팩터링
chaewon121 ccf030d
fix: 리졸버에서 터지는 에러 잡지 못하는 오류 수정
chaewon121 8458dbd
chore: 깃 충돌 해결
chaewon121 cbc25ac
style: 주석 제거
chaewon121 4bca9e9
refactor: 위치 이동
chaewon121 dce0561
refactor: 필요없는 로직 제거
chaewon121 39e1e7c
refactor: 진행중인 게임 찾는 로직 수정
chaewon121 c64fdb9
refactor: 테스트 수정
chaewon121 2e7dba4
refactor: 서브모듈 업데이트
chaewon121 f4bf86d
Merge branch 'dev_backend' of https://github.com/woowacourse-teams/20…
chaewon121 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
26 changes: 0 additions & 26 deletions
26
backend/src/main/java/com/now/naaga/letter/application/LetterFindService.java
This file was deleted.
Oops, something went wrong.
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
8 changes: 0 additions & 8 deletions
8
backend/src/main/java/com/now/naaga/letter/application/WriteLetterLogCreateService.java
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
backend/src/main/java/com/now/naaga/letter/application/letterlog/ReadLetterLogService.java
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
backend/src/main/java/com/now/naaga/letter/application/letterlog/WriteLetterLogService.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...end/src/main/java/com/now/naaga/letter/application/letterlog/dto/LetterByGameCommand.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.../src/main/java/com/now/naaga/letter/application/letterlog/dto/LetterLogCreateCommand.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...main/java/com/now/naaga/letter/application/letterlog/dto/WriteLetterLogCreateCommand.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
backend/src/main/java/com/now/naaga/letter/domain/letterlog/LetterLogType.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.now.naaga.letter.domain.letterlog; | ||
|
||
import com.now.naaga.letter.exception.LetterException; | ||
|
||
import java.util.Arrays; | ||
|
||
import static com.now.naaga.letter.exception.LetterExceptionType.INVALID_LOG_TYPE; | ||
|
||
public enum LetterLogType { | ||
|
||
READ, | ||
WRITE, | ||
; | ||
|
||
public static LetterLogType from(final String logType) { | ||
return Arrays.stream(values()) | ||
.filter(enumValue -> enumValue.name().equalsIgnoreCase(logType)) | ||
.findFirst() | ||
.orElseThrow(() -> new LetterException(INVALID_LOG_TYPE)); | ||
} | ||
|
||
public boolean isWrite() { | ||
return this == WRITE; | ||
} | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
P2:
클라이언트 단에서 들어오는 입력 값 검증에서 발생하는 예외는 바로 위 메서드에서 공통적으로 처리해주고 있어요! 그래서
MethodArgumentTypeMismatchException
예외를 위 메서드에 추가하는 게 좋을 것 같습니다 😁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.
인정...이지만 제가 던져줘야 하는 예외는 INVALID_REQUEST_BODY 가 아니라 INVALID_REQUEST_PARAMETERS여서 새로운 함수를 만들어서 던져주게 되었습니다 ㅠㅠ 사실 사용자에게 전달해야하는 예외가 요청바디가 잘못되었는지 요청 파라미터가 잘못되었는지 모두 알려줄 필요가 있을까 하는생각이어서 "잘못된 요청입니다"로 모두 보내주는것이 어떨가 생각했지만 논의가 필요하고 일단은 저희가 합의한 예외는 INVALID_REQUEST_PARAMETERS를 던져줘야해서 함수를 새로 만들게 되었네요