Skip to content

Commit

Permalink
fix(voc): 문의하기 응답 상태 코드 200 -> 201로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
zeus6768 committed Dec 23, 2024
1 parent d069499 commit 2923e8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.validation.Valid;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -20,6 +21,6 @@ public class VocController implements SpringDocVocController {
@PostMapping("/contact")
public ResponseEntity<Void> create(@Valid @RequestBody VocRequest request) {
vocService.create(request);
return ResponseEntity.ok().build();
return ResponseEntity.status(HttpStatus.CREATED).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void create() throws Exception {
mvc.perform(post("/contact")
.content(objectMapper.writeValueAsString(request))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
.andExpect(status().isCreated());
}

@Test
Expand Down

0 comments on commit 2923e8a

Please sign in to comment.