diff --git a/server/src/main/java/server/haengdong/presentation/BillActionController.java b/server/src/main/java/server/haengdong/presentation/BillActionController.java index 251f69831..94cd1666b 100644 --- a/server/src/main/java/server/haengdong/presentation/BillActionController.java +++ b/server/src/main/java/server/haengdong/presentation/BillActionController.java @@ -19,7 +19,7 @@ public class BillActionController { private final BillActionService billActionService; - @PostMapping("/api/events/{eventId}/actions/bills") + @PostMapping("/api/events/{eventId}/bill-actions") public ResponseEntity saveAllBillAction( @PathVariable("eventId") String token, @RequestBody @Valid BillActionsSaveRequest request @@ -30,7 +30,7 @@ public ResponseEntity saveAllBillAction( .build(); } - @PutMapping("/api/events/{eventId}/actions/bills/{actionId}") + @PutMapping("/api/events/{eventId}/bill-actions/{actionId}") public ResponseEntity updateBillAction( @PathVariable("eventId") String token, @PathVariable("actionId") Long actionId, @@ -42,7 +42,7 @@ public ResponseEntity updateBillAction( .build(); } - @DeleteMapping("/api/events/{eventId}/actions/{actionId}/bills") + @DeleteMapping("/api/events/{eventId}/bill-actions/{actionId}") public ResponseEntity deleteBillAction( @PathVariable("eventId") String token, @PathVariable("actionId") Long actionId diff --git a/server/src/main/java/server/haengdong/presentation/MemberActionController.java b/server/src/main/java/server/haengdong/presentation/MemberActionController.java index 3ac8028bf..1703245f7 100644 --- a/server/src/main/java/server/haengdong/presentation/MemberActionController.java +++ b/server/src/main/java/server/haengdong/presentation/MemberActionController.java @@ -20,7 +20,7 @@ public class MemberActionController { private final MemberActionService memberActionService; - @PostMapping("/api/events/{eventId}/actions/members") + @PostMapping("/api/events/{eventId}/member-actions") public ResponseEntity saveMemberAction( @PathVariable("eventId") String token, @RequestBody MemberActionsSaveRequest request @@ -48,7 +48,7 @@ public ResponseEntity deleteMember( return ResponseEntity.ok().build(); } - @DeleteMapping("/api/events/{eventId}/actions/{actionId}/members") + @DeleteMapping("/api/events/{eventId}/member-actions/{actionId}") public ResponseEntity deleteMemberAction( @PathVariable("eventId") String token, @PathVariable("actionId") Long actionId diff --git a/server/src/test/java/server/haengdong/presentation/BillActionControllerTest.java b/server/src/test/java/server/haengdong/presentation/BillActionControllerTest.java index 3170707d6..5b12599d0 100644 --- a/server/src/test/java/server/haengdong/presentation/BillActionControllerTest.java +++ b/server/src/test/java/server/haengdong/presentation/BillActionControllerTest.java @@ -48,7 +48,7 @@ void saveAllBillAction() throws Exception { String requestBody = objectMapper.writeValueAsString(request); String token = "TOKEN"; - mockMvc.perform(post("/api/events/{token}/actions/bills", token) + mockMvc.perform(post("/api/events/{token}/bill-actions", token) .contentType(MediaType.APPLICATION_JSON) .content(requestBody)) .andDo(print()) @@ -67,7 +67,7 @@ void saveAllBillAction1() throws Exception { String requestBody = objectMapper.writeValueAsString(request); String token = "TOKEN"; - mockMvc.perform(post("/api/events/{token}/actions/bills", token) + mockMvc.perform(post("/api/events/{token}/bill-actions", token) .contentType(MediaType.APPLICATION_JSON) .content(requestBody)) .andDo(print()) @@ -82,7 +82,7 @@ void updateBillAction() throws Exception { String requestBody = objectMapper.writeValueAsString(request); String token = "TOKEN"; - mockMvc.perform(put("/api/events/{token}/actions/bills/{actionId}", token, 1L) + mockMvc.perform(put("/api/events/{token}/bill-actions/{actionId}", token, 1L) .contentType(MediaType.APPLICATION_JSON) .content(requestBody)) .andDo(print()) @@ -94,7 +94,7 @@ void updateBillAction() throws Exception { void deleteBillAction() throws Exception { String token = "토다리토큰"; - mockMvc.perform(delete("/api/events/{token}/actions/{actionId}/bills", token, 1)) + mockMvc.perform(delete("/api/events/{token}/bill-actions/{actionId}", token, 1)) .andDo(print()) .andExpect(status().isOk()); } @@ -106,7 +106,7 @@ void deleteBillAction1() throws Exception { doThrow(new HaengdongException(HaengdongErrorCode.NOT_FOUND_EVENT)) .when(billActionService).deleteBillAction(any(String.class), any(Long.class)); - mockMvc.perform(delete("/api/events/{token}/actions/{actionId}/bills", token, 1)) + mockMvc.perform(delete("/api/events/{token}/bill-actions/{actionId}", token, 1)) .andDo(print()) .andExpect(status().isBadRequest()); } diff --git a/server/src/test/java/server/haengdong/presentation/MemberActionControllerTest.java b/server/src/test/java/server/haengdong/presentation/MemberActionControllerTest.java index 8a2f5661d..0c59cb172 100644 --- a/server/src/test/java/server/haengdong/presentation/MemberActionControllerTest.java +++ b/server/src/test/java/server/haengdong/presentation/MemberActionControllerTest.java @@ -43,7 +43,7 @@ void saveMemberActionTest() throws Exception { String requestBody = objectMapper.writeValueAsString(memberActionsSaveRequest); - mockMvc.perform(post("/api/events/TOKEN/actions/members") + mockMvc.perform(post("/api/events/TOKEN/member-actions") .contentType(MediaType.APPLICATION_JSON) .content(requestBody)) .andDo(print()) @@ -72,7 +72,7 @@ void deleteMemberAction() throws Exception { String token = "TOKEN"; Long actionId = 2L; - mockMvc.perform(delete("/api/events/{token}/actions/{actionId}/members", token, actionId)) + mockMvc.perform(delete("/api/events/{token}/member-actions/{actionId}", token, actionId)) .andDo(print()) .andExpect(status().isOk()); }