2222
2323@ RestController
2424@ RequiredArgsConstructor
25- @ RequestMapping ("/qna " )
25+ @ RequestMapping ("/question " )
2626@ Tag (
2727 name = "QnA 질문 API" ,
2828 description = "QnA 질문 CRUD"
@@ -51,7 +51,7 @@ public ResponseEntity<String> createQuestion(Principal principal,
5151 summary = "질문 단건 조회" ,
5252 description = "질문 ID를 통해 질문을 조회합니다."
5353 )
54- @ GetMapping ("/question/getQuestion/ {id}" )
54+ @ GetMapping ("/{id}" )
5555 public ResponseEntity <QuestionResponseDto > getQuestion (@ PathVariable Long id ) {
5656 return ResponseEntity .ok (questionService .getQuestion (id ));
5757 }
@@ -60,7 +60,7 @@ public ResponseEntity<QuestionResponseDto> getQuestion(@PathVariable Long id) {
6060 summary = "질문 삭제" ,
6161 description = "질문ID를 통해 질문을 삭제합니다."
6262 )
63- @ DeleteMapping ("/question/delete/ {id}" )
63+ @ DeleteMapping ("/{id}" )
6464 public ResponseEntity <String > deleteQuestion (@ PathVariable Long id ) {
6565 return ResponseEntity .ok (questionService .deleteQuestion (id ));
6666 }
@@ -69,7 +69,7 @@ public ResponseEntity<String> deleteQuestion(@PathVariable Long id) {
6969 summary = "유저의 질문 조회" ,
7070 description = "JWT토큰을 통해 모든 유저의 질문을 조회합니다."
7171 )
72- @ GetMapping ( "/question/getUserQuestions" )
72+ @ GetMapping
7373 public ResponseEntity <List <AllQuestionResponseDto >> getUserQuestions (Principal principal ) {
7474 return ResponseEntity .ok (questionService .getAllQuestions (principal ));
7575 }
@@ -78,7 +78,7 @@ public ResponseEntity<List<AllQuestionResponseDto>> getUserQuestions(Principal p
7878 summary = "질문 수정" ,
7979 description = "질문ID를 통해 질문을 수정합니다."
8080 )
81- @ PatchMapping ("/question/modifyQuestions/ {id}" )
81+ @ PatchMapping ("/{id}" )
8282 public ResponseEntity <String > modifyQuestion (@ PathVariable Long id ,
8383 @ RequestPart ("question" ) QuestionRequestDto questionDto ,
8484 @ RequestPart (value = "file" , required = false ) List <MultipartFile > files
0 commit comments