-
Notifications
You must be signed in to change notification settings - Fork 1
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
이메일 중복 확인 기능 구현 #53
Merged
Merged
이메일 중복 확인 기능 구현 #53
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
30c1f84
style: 불필요한 공백 제거
uijin-j 1a02a27
rename: ValidationUtils 클래스를 common/util로 이동
uijin-j abe05c2
rename: dto 패키지 하위에 request, response 폴더 추가
uijin-j eb6f153
style: 불필요한 공백 제거
uijin-j 5589d84
feat: 이메일 중복 확인 요청/응답 DTO생성
uijin-j 62bed65
feat: 이메일 중복 확인 기능 구현
uijin-j fd32b36
feat: 이메일 중복 확인 API 엔드 포인트 추가
uijin-j ae26632
test: 이메일 중복 확인 Service 테스트 코드 작성
uijin-j 229c979
refactor: 불필요한 애너테이션 제거
uijin-j d9a9ba8
merge dev
uijin-j 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
import jakarta.validation.constraints.Size; | ||
import java.net.URI; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
|
@@ -18,14 +19,17 @@ | |
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.servlet.support.ServletUriComponentsBuilder; | ||
import sixgaezzang.sidepeek.users.domain.Provider; | ||
import sixgaezzang.sidepeek.users.dto.SignUpRequest; | ||
import sixgaezzang.sidepeek.users.dto.UserSearchResponse; | ||
import sixgaezzang.sidepeek.users.dto.request.CheckEmailRequest; | ||
import sixgaezzang.sidepeek.users.dto.request.SignUpRequest; | ||
import sixgaezzang.sidepeek.users.dto.response.CheckDuplicateResponse; | ||
import sixgaezzang.sidepeek.users.dto.response.UserSearchResponse; | ||
import sixgaezzang.sidepeek.users.service.UserService; | ||
|
||
@RestController | ||
@RequestMapping("/users") | ||
@Tag(name = "User", description = "User API") | ||
@RequiredArgsConstructor | ||
@Slf4j | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 제가 디버그하려고 넣어놨다가 삭제하는 것을 까먹었네용! |
||
public class UserController { | ||
|
||
private final UserService userService; | ||
|
@@ -58,4 +62,17 @@ public ResponseEntity<UserSearchResponse> searchByNickname( | |
.body(userService.searchByNickname(keyword)); | ||
} | ||
|
||
@PostMapping("/email/check") | ||
@Operation(summary = "이메일 중복 확인") | ||
@ApiResponse(responseCode = "200", description = "이메일 중복 확인 성공") | ||
@Parameter(name = "email", description = "이메일", example = "[email protected]") | ||
public ResponseEntity<CheckDuplicateResponse> checkEmailDuplicate( | ||
@RequestBody @Valid CheckEmailRequest request | ||
) { | ||
CheckDuplicateResponse response = userService.checkEmailDuplicate(request.email()); | ||
|
||
return ResponseEntity.ok() | ||
.body(response); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/sixgaezzang/sidepeek/users/dto/request/CheckEmailRequest.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,10 @@ | ||
package sixgaezzang.sidepeek.users.dto.request; | ||
|
||
import jakarta.validation.constraints.Email; | ||
|
||
public record CheckEmailRequest( | ||
String email | ||
) { | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...ang/sidepeek/users/dto/SignUpRequest.java → ...peek/users/dto/request/SignUpRequest.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
7 changes: 7 additions & 0 deletions
7
src/main/java/sixgaezzang/sidepeek/users/dto/response/CheckDuplicateResponse.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,7 @@ | ||
package sixgaezzang.sidepeek.users.dto.response; | ||
|
||
public record CheckDuplicateResponse( | ||
boolean isDuplicated | ||
) { | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...idepeek/users/dto/UserSearchResponse.java → ...sers/dto/response/UserSearchResponse.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
2 changes: 1 addition & 1 deletion
2
...depeek/users/dto/UserSummaryResponse.java → ...ers/dto/response/UserSummaryResponse.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
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
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.
요 부분은 제가 MAX_SKILL_NAME_LENGTH라는 상수 만들어서 적용했는데 머지하고 나서 제가 확인해볼게유! 코드 탭 정돈까지 해주셔서 감사합니당!!🥰
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.
충돌해결하면서 세희님 코드로 변경했습니다! 감사합니당!!🥰