Skip to content

Commit

Permalink
#9 feat: findBoard에 boardImagesurls를 포함해서 반환하는 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaktmchl committed Oct 16, 2022
1 parent ce42257 commit e486a3e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,13 @@ public ApplicationResponse<List<BoardRes>> findAllBoards(GetAllBoardsReq dto){
@Transactional(readOnly = true)
@Override
public ApplicationResponse<BoardRes> findBoard(GetBoardReq dto){
List<String> imageUrls = new ArrayList<>();

User user = userRepository.findById(dto.getUserId())
.orElseThrow(() -> new NotFoundUserException());

Board board = boardRepository.findBoardById(dto.getBoardId())
.orElseThrow(() -> new NotFoundBoardException());

BoardRes boardRes = BoardRes.toDto(board, imageUrls);
BoardRes boardRes = BoardRes.toDto(board, awsS3Service.makeUrlsOfFilenames(board.getBoardImagesUUids()));
return ApplicationResponse.ok(boardRes);
}

Expand Down

0 comments on commit e486a3e

Please sign in to comment.