diff --git a/backend/ddang/src/main/java/com/ddang/ddang/authentication/presentation/AuthenticationController.java b/backend/ddang/src/main/java/com/ddang/ddang/authentication/presentation/AuthenticationController.java index 8f8c1b6bd..dbe06a80a 100644 --- a/backend/ddang/src/main/java/com/ddang/ddang/authentication/presentation/AuthenticationController.java +++ b/backend/ddang/src/main/java/com/ddang/ddang/authentication/presentation/AuthenticationController.java @@ -14,7 +14,6 @@ import lombok.RequiredArgsConstructor; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -68,7 +67,7 @@ public ResponseEntity logout( .build(); } - @DeleteMapping("/withdrawal/{oauth2Type}") + @PostMapping("/withdrawal/{oauth2Type}") public ResponseEntity withdrawal( @PathVariable final Oauth2Type oauth2Type, @RequestHeader(HttpHeaders.AUTHORIZATION) final String accessToken, diff --git a/backend/ddang/src/test/java/com/ddang/ddang/authentication/presentation/AuthenticationControllerTest.java b/backend/ddang/src/test/java/com/ddang/ddang/authentication/presentation/AuthenticationControllerTest.java index ffd196c46..5f300a161 100644 --- a/backend/ddang/src/test/java/com/ddang/ddang/authentication/presentation/AuthenticationControllerTest.java +++ b/backend/ddang/src/test/java/com/ddang/ddang/authentication/presentation/AuthenticationControllerTest.java @@ -203,7 +203,6 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { ) ) ); - ; } @Test @@ -304,7 +303,7 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { willDoNothing().given(authenticationService).withdrawal(any(), anyString(), anyString()); // when & then - mockMvc.perform(RestDocumentationRequestBuilders.delete("/oauth2/withdrawal/{oauth2Type}", "kakao") + mockMvc.perform(RestDocumentationRequestBuilders.post("/oauth2/withdrawal/{oauth2Type}", "kakao") .contentType(MediaType.APPLICATION_JSON) .content(objectMapper.writeValueAsString(request)) .header(HttpHeaders.AUTHORIZATION, "Bearer accessToken") @@ -336,7 +335,7 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { .withdrawal(any(), anyString(), anyString()); // when & then - mockMvc.perform(RestDocumentationRequestBuilders.delete("/oauth2/withdrawal/{oauth2Type}", "kakao") + mockMvc.perform(RestDocumentationRequestBuilders.post("/oauth2/withdrawal/{oauth2Type}", "kakao") .contentType(MediaType.APPLICATION_JSON) .content(objectMapper.writeValueAsString(request)) .header(HttpHeaders.AUTHORIZATION, "Bearer accessToken")