Skip to content

Commit

Permalink
Merge pull request #294 from twenty-three-23/feature/TT-346-filter-chain
Browse files Browse the repository at this point in the history
!bug: userId가 가져와지는지 로그로 확인
  • Loading branch information
ch8930 authored Aug 7, 2024
2 parents d7ebeae + 2a8f940 commit af3da06
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import com.twentythree.peech.user.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
Expand All @@ -31,6 +33,7 @@ public class UserController implements SwaggerUserController{
private final UserService userService;
private final UserMapper userMapper;
private final UserFetcher userFetcher;
private final Logger log = LoggerFactory.getLogger(UserController.class);

@Operation(summary = "유저 가입",
description = "deviceId를 RequestBody에 담아 요청하면 새로운 유저를 생성하고 생성된 UserId를 응답한다.")
Expand Down Expand Up @@ -65,6 +68,7 @@ public ResponseEntity<UserIdTokenResponseDTO> completeProfile(@RequestBody Compl
JWTAuthentication jwtAuthentication = (JWTAuthentication) authentication.getPrincipal();

Long userId = jwtAuthentication.getUserId();
log.info("userId : {}", userId);

AccessAndRefreshToken accessAndRefreshToken = userService.completeProfile(userId,request.getFirstName(), request.getLastName(), request.getNickName(), request.getBirth(), request.getGender());

Expand Down

0 comments on commit af3da06

Please sign in to comment.