Merge branch 'be/lecture' into 'backend'
feat: lecture 강의 삭제시 저장소에서 사진 삭제 See merge request s11-webmobile1-sub2/S11P12A701!164
This commit is contained in:
commit
852d0efc2e
@ -113,6 +113,12 @@ public class LectureServiceImpl implements LectureService {
|
||||
return false;
|
||||
}
|
||||
|
||||
String image = lecture.getImage();
|
||||
if (image != null) {
|
||||
File file = new File(lecture.getImage());
|
||||
file.delete();
|
||||
}
|
||||
|
||||
lectureRepository.deleteById(lectureId);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user