Skip to content

Commit

Permalink
🐛[fix]: search api mapping methods modification
Browse files Browse the repository at this point in the history
- change get to post
- even though the api is for searching, there are too many search conditions in payload.
- so decided to modify the mothod to POST so that the url not too long
  • Loading branch information
Hyesooo committed Oct 24, 2023
1 parent 13ab730 commit dff8182
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -32,9 +32,8 @@ public class SearchController {
/**
* 명언탐색
*/
@GetMapping("/quote")
@Operation(summary = "명언 탐색",
description = "조건에 맞게 명언을 탐색한다",
@PostMapping("/quote")
@Operation(summary = "명언 탐색", description = "조건에 맞게 명언을 탐색한다",
responses = { @ApiResponse(responseCode = "200", description = "조회 성공", content = @Content(schema = @Schema(implementation = RandomQuoteResource.class)))}
)
public ApiRes<Page<QuoteResource>> searchQuotes(@RequestBody @io.swagger.v3.oas.annotations.parameters.RequestBody QuoteSearchResource searchResource){
Expand Down

0 comments on commit dff8182

Please sign in to comment.