diff --git a/src/main/java/com/example/holing/bounded_context/auth/controller/AuthController.java b/src/main/java/com/example/holing/bounded_context/auth/controller/AuthController.java index 89b0103..e17fa75 100644 --- a/src/main/java/com/example/holing/bounded_context/auth/controller/AuthController.java +++ b/src/main/java/com/example/holing/bounded_context/auth/controller/AuthController.java @@ -76,7 +76,7 @@ public ResponseEntity signIn(@RequestBody SignInRequestDto re String accessToken = jwtProvider.generatorAccessToken(user.getEmail(), user.getId()); - SignInResponseDto response = SignInResponseDto.of(accessToken, user.getSocialId()); + SignInResponseDto response = SignInResponseDto.of(accessToken, user); return ResponseEntity.ok().body(response); } diff --git a/src/main/java/com/example/holing/bounded_context/auth/dto/SignInResponseDto.java b/src/main/java/com/example/holing/bounded_context/auth/dto/SignInResponseDto.java index 4183f91..4b5f4f1 100644 --- a/src/main/java/com/example/holing/bounded_context/auth/dto/SignInResponseDto.java +++ b/src/main/java/com/example/holing/bounded_context/auth/dto/SignInResponseDto.java @@ -1,10 +1,17 @@ package com.example.holing.bounded_context.auth.dto; +import com.example.holing.bounded_context.user.entity.User; + public record SignInResponseDto( String accessToken, - Long socialId + Long socialId, + Boolean isSelfTested ) { - public static SignInResponseDto of(String accessToken, Long socialId) { - return new SignInResponseDto(accessToken, socialId); + public static SignInResponseDto of(String accessToken, User user) { + return new SignInResponseDto( + accessToken, + user.getSocialId(), + user.getIsSelfTested() + ); } }