Skip to content

Commit

Permalink
[fix] #90 interview 삭제 시 memo도 같이 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
myhyun0002 committed Feb 8, 2023
1 parent 9bb5740 commit 06ccb49
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 06ccb49

Please sign in to comment.