feat: qna delete 수정
This commit is contained in:
parent
ca1437f34c
commit
2db6511a19
@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user