feat: qna delete 수정

This commit is contained in:
박정민 2024-08-02 13:20:02 +09:00
parent ca1437f34c
commit 2db6511a19

View File

@ -138,6 +138,9 @@ qnaRepository.deleteById(id);
@Override @Override
public void deleteAnswer(Long id) throws SQLException { public void deleteAnswer(Long id) throws SQLException {
qnaRepository.deleteById(id); Qna findQna = qnaRepository.findById(id).orElse(null);
findQna.setAnswer(null);
qnaRepository.save(findQna);
} }
} }