diff --git a/src/main/java/com/example/umc3_teamproject/service/InterviewService.java b/src/main/java/com/example/umc3_teamproject/service/InterviewService.java index 3854cdc..47a9725 100644 --- a/src/main/java/com/example/umc3_teamproject/service/InterviewService.java +++ b/src/main/java/com/example/umc3_teamproject/service/InterviewService.java @@ -23,6 +23,9 @@ public class InterviewService { @Autowired private final InterviewResponseDto interviewResponse; + @Autowired + private final MemoService memoService; + public ResponseEntity writeInterview(InterviewRequestDto.Register interview1) { Interview interview=Interview.builder() @@ -78,6 +81,9 @@ public String removeInterview(Long id){ deletedInterview.setDeleted(true); interviewRepository.save(deletedInterview); + // interview에 속해있는 memo도 같이 삭제해야 하기 때문에 코드 추가했습니다. + memoService.deleteMemo("interview",id); + return id+" deleted success"; } return null;