Projekt

Obecné

Profil

« Předchozí | Další » 

Revize dda6e56e

Přidáno uživatelem Václav Honzík před asi 2 roky(ů)

Send text query to the api

re #9629

Zobrazit rozdíly:

backend/src/main/java/cz/zcu/kiv/backendapi/path/PathController.java
4 4
import io.swagger.v3.oas.annotations.Operation;
5 5
import lombok.RequiredArgsConstructor;
6 6
import org.springframework.web.bind.annotation.GetMapping;
7
import org.springframework.web.bind.annotation.PostMapping;
7 8
import org.springframework.web.bind.annotation.RequestBody;
8 9
import org.springframework.web.bind.annotation.RequestMapping;
9 10
import org.springframework.web.bind.annotation.RestController;
......
27 28
     * @param pathDto catalog DTO with text to be searched
28 29
     * @return path DTO with highlighted text and found catalog items
29 30
     */
30
    @GetMapping("")
31
    @PostMapping("")
31 32
    @Operation(summary = "returns path with highlighted text and found catalog items based on given text")
32 33
    public PathDto getPath(@RequestBody PathDto pathDto) {
33 34
        return catalogItemService.getPath(pathDto.getText());

Také k dispozici: Unified diff