Skip to content

Commit

Permalink
chore: portfolioId 리턴
Browse files Browse the repository at this point in the history
  • Loading branch information
daeun084 committed Feb 15, 2024
1 parent dc1dd85 commit a4404f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class PortfolioController {
@Operation(summary = "포트폴리오 생성", description = "포트폴리오를 생성하는 API입니다.")
@PostMapping()
public ApiResponse createPortfolio(@RequestBody CreatePortfolioDto portfolioDto){
portfolioService.createPortfolio(portfolioDto);
return ApiResponse.SuccessResponse(SuccessStatus.PORTFOLIO_CREATE);
return ApiResponse.SuccessResponse(SuccessStatus.PORTFOLIO_CREATE, portfolioService.createPortfolio(portfolioDto));
}

@Operation(summary = "포트폴리오 전체 조회", description = "포트폴리오 전체를 조회하는 API입니다.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class PortfolioService {

//포트폴리오 생성
@Transactional
public void createPortfolio(CreatePortfolioDto dto) {
public Long createPortfolio(CreatePortfolioDto dto) {
Artist artist = artistRepository.findById(dto.getArtistId())
.orElseThrow(() -> new GlobalException(ErrorStatus.NOT_EXIST_ARTIST));

Expand All @@ -58,6 +58,7 @@ public void createPortfolio(CreatePortfolioDto dto) {

artist.updatePortfolioList(portfolio);
portfolioRepository.save(portfolio);
return portfolio.getPortfolioId();
}

// 포트폴리오 전체 조회
Expand Down

0 comments on commit a4404f7

Please sign in to comment.