Skip to content

Commit

Permalink
fix: 회원가입 여부 조회 POST로 변경, 요청 데이터 형태 request body로 롤백
Browse files Browse the repository at this point in the history
  • Loading branch information
bflykky committed Aug 9, 2024
1 parent ef33ba8 commit 2c08862
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,9 @@ public ResultResponse<LoginInfo> login(@Valid @RequestBody LoginRequest request)
return ResultResponse.of(LOGIN, memberService.login(request));
}

@GetMapping("/check-registration")
@PostMapping("/check-registration")
@Operation(summary = "회원가입 여부 조회 API", description = "authId와 플랫폼명을 통해, 해당 정보와 일치하는 회원의 가입 여부를 조회하는 API입니다.")
@Parameters(value = {
@Parameter(name = "socialType", description = "KAKAO, GOOGLE 중 하나를 입력해야 합니다."),
@Parameter(name = "authId", description = "로그인한 소셜 플랫폼에서 제공한 회원 번호를 입력해야 합니다.")
})
public ResultResponse<CheckMemberRegistration> checkSignup(@RequestParam("socialType") SocialType socialType,
@RequestParam("authId") String authId) {
return ResultResponse.of(CHECK_MEMBER_REGISTRATION, memberService.checkRegistration(socialType, authId));
public ResultResponse<CheckMemberRegistration> checkSignup(@Valid @RequestBody LoginRequest request) {
return ResultResponse.of(CHECK_MEMBER_REGISTRATION, memberService.checkRegistration(request));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public interface MemberService {
LoginInfo signup(String tempMemberInfo, MarketingAgreedRequest request);
LoginInfo signup(SignupRequest request);
LoginInfo login(LoginRequest request);
CheckMemberRegistration checkRegistration(SocialType socialType, String authId);
CheckMemberRegistration checkRegistration(LoginRequest request);
MemberInfo getMyInfo(Member member);
Member findMember(Long memberId);
Member findMember(SocialType socialType, String authId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public LoginInfo login(LoginRequest request) {
}

@Override
public CheckMemberRegistration checkRegistration(SocialType socialType, String authId) {
boolean isRegistered = memberRepository.existsBySocialTypeAndAuthId(socialType, authId);
public CheckMemberRegistration checkRegistration(LoginRequest request) {
boolean isRegistered = memberRepository.existsBySocialTypeAndAuthId(request.getSocialType(), request.getAuthId());
return new CheckMemberRegistration(isRegistered);
}

Expand Down

0 comments on commit 2c08862

Please sign in to comment.