File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/main/java/org/dfbf/soundlink/domain/user Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,7 @@ public class UserController {
2929 @ GetMapping ("/checkNickName" )
3030 @ Operation (summary = "닉네임 중복 확인" , description = "닉네임이 이미 사용중인지 확인." )
3131 public ResponseResult checkNickName (@ RequestParam String nickName ){
32- boolean exists = userService .checkNickName (nickName );
33- return exists
34- ? new ResponseResult (ErrorCode .DUPLICATE_NICKNAME ) //중복 닉네임
35- : new ResponseResult (ErrorCode .NOT_DUPLICATE_NICKNAME );
32+ return userService .checkNickName (nickName );
3633 }
3734
3835 @ GetMapping
Original file line number Diff line number Diff line change @@ -168,8 +168,12 @@ public ResponseResult checkEmail(String email){
168168 }
169169
170170 //닉네임 중복 확인
171- public boolean checkNickName (String nickName ){
172- return userRepository .existsByNickName (nickName );
171+ public ResponseResult checkNickName (String nickName ){
172+ boolean exists =userRepository .existsByNickName (nickName );
173+ if (exists ){
174+ return new ResponseResult (ErrorCode .DUPLICATE_NICKNAME );
175+ }
176+ return new ResponseResult (ErrorCode .NOT_DUPLICATE_NICKNAME );
173177 }
174178
175179 //refreshToken을 쿠키로 설정
You can’t perform that action at this time.
0 commit comments