findAll(String)   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
1
package com.osomapps.pt.programs;
2
3
import java.util.List;
4
import org.springframework.beans.factory.annotation.Autowired;
5
import org.springframework.web.bind.annotation.GetMapping;
6
import org.springframework.web.bind.annotation.RequestHeader;
7
import org.springframework.web.bind.annotation.RequestMapping;
8
import org.springframework.web.bind.annotation.RestController;
9
10
@RestController
11
@RequestMapping("api/v1/programs")
12
class ProgramsResource {
13
14
    private final ProgramService programService;
15
16
    @Autowired
17
    ProgramsResource(ProgramService programService) {
18
        this.programService = programService;
19
    }
20
21
    @GetMapping
22
    List<ProgramResponseDTO> findAll(@RequestHeader(value = "X-Token") String token) {
23
        return programService.getExamples(token);
24
    }
25
}
26