-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat : 호스트 유저 관리 기능 구현 #200
Conversation
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.
굿~
private final UserUtils userUtils; | ||
private final HostMapper hostMapper; | ||
|
||
public List<UserProfileVo> execute(Long hostId, @Valid @Email String email) { |
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.
요기 valid들어간 이유 알수 있을까염?
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.
요기 valid들어간 이유 알수 있을까염?
까먹고 안지웠네요 지우고 커밋할게용
public void activate() { | ||
this.active = true; | ||
} | ||
|
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.
이미 activate 된 상태인경우
밸리데이션을 추가하는게 좋을까요...?
승인 버튼을 여러번 클릭하면 이미 승인된 호스트입니다 이렇게 출력하거나..
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.
이미 activate 된 상태인경우 밸리데이션을 추가하는게 좋을까요...? 승인 버튼을 여러번 클릭하면 이미 승인된 호스트입니다 이렇게 출력하거나..
검증이 서비스 단에서 이뤄지고 있긴 한데 호스트 도메인 내부에서 이뤄지는 게 맞는 거 같네요
public List<User> queryUserByEmailContains(String email) { | ||
return userRepository.findByProfileEmailContains(email); | ||
} |
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.
contains 보다는
완벽 일치해서 유저 가져오는게 어떨까유?
자동완성 없이
그냥 water0641@naver.com 이라고 똑바로 쳐야
그때 검색해서 있으면 초대하고
없으면 초대 불가 하는 식으로요!
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.
contains 보다는 완벽 일치해서 유저 가져오는게 어떨까유?
자동완성 없이 그냥 water0641@naver.com 이라고 똑바로 쳐야 그때 검색해서 있으면 초대하고 없으면 초대 불가 하는 식으로요!
contains
는 1@naver.com
이런 식으로 해도 검증 통과하더라구요 찬진님 방식이 좋은 거 같습니다
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
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 ⭐
private String email; | ||
|
||
@Schema(defaultValue = "HOST", description = "호스트 유저 역할") | ||
@Enum(message = "HOST 또는 SUPER_HOST 만 허용됩니다") |
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 안붙여도 원래 검증되는 부분으로 알고있는데 메시지 노출때문에 넣으신건가요?!?
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 안붙여도 원래 검증되는 부분으로 알고있는데 메시지 노출때문에 넣으신건가요?!?
넹 맞습니다
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.
고생하셨습니당~~
개요
작업사항
UserProfileVo
추가 -> 나중에 단순 프로필 미리보기 용으로 써도 좋을듯ConstraintViolationExceptionHandler
추가 구현@Valid
와 던지는 예외가 아예 달라서 추가했습니다@Validated
추가해주면 Constraints 관련 어노테이션 RequestParam 에도 사용 가능합니다변경로직