Skip to content

Commit

Permalink
[FIX] Login 수정 + Member 정보에서 전화번호 삭제 + AfterLoginDto 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjoo-lab committed Sep 26, 2023
1 parent 5c0ff04 commit c5f12a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public ResponseEntity<TokenDto> authorize(@RequestBody TokenRequest tokenRequest
}

@PostMapping("/save")
public ResponseEntity<TokenDto> saveMember(@RequestBody MemberSaveRequest memberSaveRequest) {
TokenDto tokenDto = authService.saveMember(memberSaveRequest);
public ResponseEntity<AfterLoginDto> saveMember(@RequestBody MemberSaveRequest memberSaveRequest) {
AfterLoginDto tokenDto = authService.saveMember(memberSaveRequest);

return ResponseEntity.status(HttpStatus.OK).body(tokenDto);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public AuthService(
* */

@Transactional
public TokenDto saveMember(MemberSaveRequest request) {
public AfterLoginDto saveMember(MemberSaveRequest request) {
Member member = memberMapper.toMemberEntity(request);

String clientId = request.getOauthRequest().getToken();
Expand All @@ -58,7 +58,7 @@ public TokenDto saveMember(MemberSaveRequest request) {
UsernamePasswordAuthenticationToken credit = tokenProvider.makeCredit(member);
TokenDto tokenDto = saveRefreshToken(credit, member.getId().toString());

return tokenDto;
return new AfterLoginDto(AuthStatus.SI,tokenDto);
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void authorize() throws Exception {
@DisplayName("첫 로그인 API가 수행되는가")
void saveMember() throws Exception {
// given
final TokenDto expected = new TokenDto("access.token.value", "refresh.token.value");
final AfterLoginDto expected = new AfterLoginDto(AuthStatus.SI,new TokenDto("access.token.value", "refresh.token.value"));
given(authService.saveMember(any())).willReturn(expected);

// when
Expand Down

0 comments on commit c5f12a1

Please sign in to comment.