diff --git a/backend/src/main/java/com/edufocus/edufocus/qna/controller/QnaController.java b/backend/src/main/java/com/edufocus/edufocus/qna/controller/QnaController.java index 6ba7628..fe50454 100644 --- a/backend/src/main/java/com/edufocus/edufocus/qna/controller/QnaController.java +++ b/backend/src/main/java/com/edufocus/edufocus/qna/controller/QnaController.java @@ -68,7 +68,7 @@ public class QnaController { } } - @DeleteMapping("/answer/delete/{qna_id}") + @PostMapping("/answer/delete/{qna_id}") public ResponseEntity deleteAnswer(@PathVariable("qna_id") Long qna_id) { try { diff --git a/backend/src/main/java/com/edufocus/edufocus/qna/service/QnaServiceImpl.java b/backend/src/main/java/com/edufocus/edufocus/qna/service/QnaServiceImpl.java index c9e537f..d583346 100644 --- a/backend/src/main/java/com/edufocus/edufocus/qna/service/QnaServiceImpl.java +++ b/backend/src/main/java/com/edufocus/edufocus/qna/service/QnaServiceImpl.java @@ -141,6 +141,6 @@ qnaRepository.deleteById(id); Qna findQna = qnaRepository.findById(id).orElse(null); findQna.setAnswer(null); qnaRepository.save(findQna); - + } }