Skip to content

Commit

Permalink
Merge pull request #88 from TUK-MoreView/Feat/12-add-memberId
Browse files Browse the repository at this point in the history
feat: memberId 추가 (#87)
  • Loading branch information
why-only-english authored Aug 8, 2024
2 parents 977342e + 20e2bf7 commit 261bfd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public ResponseEntity<TokenDto> authorize(@Valid @RequestBody MemberLoginRequest
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add(JwtFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);

return new ResponseEntity<>(new TokenDto(jwt), httpHeaders, HttpStatus.OK);
TokenDto tokenDto = new TokenDto(jwt, request.getMemberId());

return new ResponseEntity<>(tokenDto, httpHeaders, HttpStatus.OK);
}

@GetMapping("/user")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
public class TokenDto {

private String token;
private Long memberId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ public class MemberLoginRequest {
private String email;
@NotBlank
private String password;
private Long memberId;
}

0 comments on commit 261bfd8

Please sign in to comment.