Skip to content

Commit df817eb

Browse files
authored
Merge pull request #212 from GDGoCINHA/develop
[FIX] #209: 중복 email 검증 오류 해결
2 parents 0abadec + a896b17 commit df817eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/inha/gdgoc/domain/user/controller/UserController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.springframework.web.bind.annotation.PostMapping;
2020
import org.springframework.web.bind.annotation.RequestBody;
2121
import org.springframework.web.bind.annotation.RequestMapping;
22+
import org.springframework.web.bind.annotation.RequestParam;
2223
import org.springframework.web.bind.annotation.RestController;
2324

2425
@RequestMapping("/api/v1")
@@ -31,9 +32,10 @@ public class UserController {
3132
// TODO 진짜 돌았냐? POST로 바꿔라
3233
@GetMapping("/auth/check")
3334
public ResponseEntity<ApiResponse<CheckDuplicatedEmailResponse, Void>> checkDuplicatedEmail(
34-
@RequestBody CheckDuplicatedEmailRequest checkDuplicatedEmailRequest
35+
@RequestParam String email
3536
) {
36-
CheckDuplicatedEmailResponse response = userService.isExistsByEmail(checkDuplicatedEmailRequest);
37+
CheckDuplicatedEmailResponse response =
38+
userService.isExistsByEmail(new CheckDuplicatedEmailRequest(email));
3739

3840
return ResponseEntity.ok(ApiResponse.ok(USER_EMAIL_DUPLICATION_RETRIEVED_SUCCESS, response));
3941
}

0 commit comments

Comments
 (0)