Skip to content

Commit

Permalink
유효성
Browse files Browse the repository at this point in the history
  • Loading branch information
Johyunik committed Dec 2, 2023
1 parent 76a85d0 commit b27a1c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/weatherfit/board/service/BoardService.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ public void patchBoard(int boardId, String boardJson, MultipartFile[] newImages,

ObjectMapper objectMapper = new ObjectMapper();

// 삭제할 이미지 삭제
for (String id : deleteImageIds) {
imageRepository.deleteById(Integer.valueOf(id));
if (deleteImageIds != null) {
for (String id : deleteImageIds) {
// 이미지 삭제 처리
}
}

// 새로운 이미지 저장
Expand Down

0 comments on commit b27a1c0

Please sign in to comment.