Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#84 [fix] kakao id에서 user id로 수정 #85

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
Expand Down