feat: lecture 강의 삭제시 저장소에서 사진 삭제
This commit is contained in:
parent
d539bc39e7
commit
7fe5ec3b2b
@ -113,6 +113,12 @@ public class LectureServiceImpl implements LectureService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String image = lecture.getImage();
|
||||||
|
if (image != null) {
|
||||||
|
File file = new File(lecture.getImage());
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
|
||||||
lectureRepository.deleteById(lectureId);
|
lectureRepository.deleteById(lectureId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user