-
Notifications
You must be signed in to change notification settings - Fork 0
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
[COZY-411] feat : 사용자 관련 validation 고도화 #198
Conversation
리뷰해드려요~ClientIdMaker.java - Review
Member.java - Review
MemberController.java - Review
SignInRequestDTO.java - Review
SignUpRequestDTO.java - Review
Gender.java - Review
SocialType.java - Review
MemberCommandService.java - Review
MemberQueryService.java - Review
MessageSourceConfig.java - Review
ErrorStatus.java - Review
EnumValidator.java - Review
EnumValue.java - Review
|
리뷰해드려요~ClientIdMaker.java - Review
Member.java - Review
MemberController.java - Review
SignInRequestDTO.java - Review
SignUpRequestDTO.java - Review
Gender.java - Review
SocialType.java - Review
MemberCommandService.java - Review
MemberQueryService.java - Review
MessageSourceConfig.java - Review
ErrorStatus.java - Review
EnumValidator.java - Review
EnumValue.java - Review
|
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.
베로가 만든 @EnumValid 를 가져다 쓰면서 수정하고 싶은 부분을 수정했습니다.
원래 Enum Name과 일치한지를 봤는데 대소문자 건너 뛰고 검증합니다.
@@ -0,0 +1,12 @@ | |||
package com.cozymate.cozymate_server.global.utils; |
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.
enum 쓰실 때 valueOf()
대신 이거 구현하셔서 getValue()
쓰시는걸 추천합니다. 대소문자 상관없이 값을 추출합니다
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.
getValue를 어떤 이유 때문에 추천하시나요?
.filter(socialType -> socialType.name().equalsIgnoreCase(socialTypeString)) | ||
.findFirst() | ||
.orElseThrow( () -> new GeneralException(ErrorStatus._INVALID_SOCIAL_TYPE)); | ||
public static SocialType getValue(String socialTypeString){ |
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.
Enum 쓰신다면 밑에 EnumValue 인터페이스 어케 생긴지 보시고 이것처럼 구현 하시면 좋을 것 같습니다!!
리뷰해드려요~
It's important to note that these changes are based on a code review and may not reflect the full context or reasoning behind each change. It's always best to consult with the developer or team responsible for the code to fully understand the changes and their implications. |
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.
LGTM~ 제 코드도 getValue()로 바꿔야겠네요
@NotNull(message = "null일 수 없습니다.") | ||
@NotEmpty(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.
이부분 @notblank 하나로 대체 가능할 것 같은데,
상황별로 자세한 메시지 응답하려는 의도인가요?
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.
좋은거같아용
@@ -59,7 +64,7 @@ public SignInResponseDTO signIn(SignInRequestDTO signInRequestDTO) { | |||
|
|||
String clientId = ClientIdMaker.makeClientId(signInRequestDTO.clientId(), socialType); | |||
|
|||
log.debug("사용자 로그인 : {}",clientId); | |||
log.info("사용자 로그인 : {}", clientId); |
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를 호출했을 때 REQUEST에 UserID 출력 안되나요?
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.
아 이거 지금 바꿀게여 debug로 바꿔서 pr올린다는걸 빼먹었네여
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.
LGTM~ 고생하셨습니다
@@ -0,0 +1,12 @@ | |||
package com.cozymate.cozymate_server.global.utils; |
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.
getValue를 어떤 이유 때문에 추천하시나요?
리뷰해드려요~
These changes improve the code by adding more validations, simplifying the code, and making it more readable. |
* [COZY-411] feat : 예외 메시지 기본 틀 생성 * [COZY-411] feat : enum값 관련 interface 생성 * [COZY-411] feat : 사용자 관련 validation 고도화 * [COZY-411] fix : 에러 메시지 안 쓰게돼서 설정에서 삭제 * [COZY-411] rename : 에러 메시지 안 쓰게돼서 설정파일 삭제 * [COZY-411] fix : log 타입 수정
⚒️develop의 최신 커밋을 pull 받았나요?
#️⃣ 작업 내용
동작 확인
clientId, socialType validation
nickname validation
gender validation
💬 리뷰 요구사항(선택)