Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7ba346c1

Přidáno uživatelem stepanekp před více než 1 rok

Zobrazit rozdíly:

src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/management/CategoryController.java
1 1
package cz.zcu.fav.kiv.antipatterndetectionapp.v2.controller.management;
2 2

  
3
import com.google.gson.Gson;
4
import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
5
import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Category;
6
import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
7
import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
8 3
import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.CategoryDto;
9 4
import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.GeneralResponseDto;
10 5
import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.management.category.ICategories;
11
import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.CategoryToDto;
12 6
import lombok.RequiredArgsConstructor;
13
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.http.HttpStatus;
15 7
import org.springframework.http.ResponseEntity;
16 8
import org.springframework.stereotype.Controller;
17
import org.springframework.web.bind.annotation.GetMapping;
18 9
import org.springframework.web.bind.annotation.PostMapping;
10
import org.springframework.web.bind.annotation.RequestBody;
19 11
import org.springframework.web.bind.annotation.RequestMapping;
20 12

  
21
import java.util.List;
13
import java.util.Map;
22 14

  
23 15
/**
24 16
 * This class contains all endpoints connected to Categories
......
30 22

  
31 23
    private final ICategories categories;
32 24

  
33
    @GetMapping("/getCategories")
25
    @PostMapping("/getCategories")
34 26
    public ResponseEntity<GeneralResponseDto<CategoryDto>> getCategories(@RequestBody Map<String, String> requestData) {
35 27
        return categories.getResponse(requestData.get("projectId"));
36 28
    }

Také k dispozici: Unified diff