Skip to content

Commit 17ed108

Browse files
committed
Feat : 데이터베이스에 uuid를 갖는 로우 존재확인하는 메서드 추가
1 parent 7d7ce43 commit 17ed108

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

back/src/main/java/com/back/domain/file/video/service/VideoService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ public Video updateStatus(String uuid, String status) {
2929
news.updateStatus(status);
3030
return videoRepository.save(news);
3131
}
32+
33+
public void isExistByUuid(String uuid) {
34+
if (!videoRepository.existsByUuid(uuid)) {
35+
throw new ServiceException("404", "Video not found");
36+
}
37+
}
3238
}

0 commit comments

Comments
 (0)