From ca76b6f25c479dfdceefc0267505e260fa5771b6 Mon Sep 17 00:00:00 2001 From: KWY Date: Wed, 10 Jan 2024 21:18:38 +0900 Subject: [PATCH] =?UTF-8?q?#84=20[fix]=20kakao=20id=EC=97=90=EC=84=9C=20us?= =?UTF-8?q?er=20id=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/moddy/server/service/designer/DesignerService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/moddy/server/service/designer/DesignerService.java b/src/main/java/com/moddy/server/service/designer/DesignerService.java index 355a3337..c92d9e8e 100644 --- a/src/main/java/com/moddy/server/service/designer/DesignerService.java +++ b/src/main/java/com/moddy/server/service/designer/DesignerService.java @@ -4,7 +4,6 @@ import com.moddy.server.config.jwt.JwtService; import com.moddy.server.controller.designer.dto.request.DesignerCreateRequest; import com.moddy.server.controller.designer.dto.response.DesignerCreateResponse; -import com.moddy.server.controller.model.dto.response.OpenChatResponse; import com.moddy.server.domain.day_off.DayOff; import com.moddy.server.domain.day_off.repository.DayOffJpaRepository; import com.moddy.server.domain.designer.Designer; @@ -33,8 +32,9 @@ public class DesignerService { private final KakaoAuthApiClient kakaoAuthApiClient; private final KakaoApiClient kakaoApiClient; private final JwtService jwtService; + @Transactional - public DesignerCreateResponse createDesigner(String baseUrl,String code, DesignerCreateRequest request) { + public DesignerCreateResponse createDesigner(String baseUrl, String code, DesignerCreateRequest request) { String profileImgUrl = s3Service.uploadProfileImage(request.profileImg(), Role.HAIR_DESIGNER); @@ -72,7 +72,7 @@ public DesignerCreateResponse createDesigner(String baseUrl,String code, Designe dayOffJpaRepository.save(dayOff); }); - TokenPair tokenPair = jwtService.generateTokenPair(kakaoId); + TokenPair tokenPair = jwtService.generateTokenPair(designer.getId().toString()); DesignerCreateResponse designerCreateResponse = new DesignerCreateResponse(tokenPair.accessToken(), tokenPair.refreshToken()); return designerCreateResponse; }