com.osomapps.pt.admin.exercise.AdminExerciseFileResource   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
dl 0
loc 14
c 1
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findAll(List) 0 3 1
A AdminExerciseFileResource(AdminExerciseFileService) 0 3 1
1
package com.osomapps.pt.admin.exercise;
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.PathVariable;
7
import org.springframework.web.bind.annotation.RequestMapping;
8
import org.springframework.web.bind.annotation.RestController;
9
10
@RestController
11
@RequestMapping("api/v1/admin/exercise-file")
12
class AdminExerciseFileResource {
13
14
    private final AdminExerciseFileService exerciseFileService;
15
16
    @Autowired
17
    AdminExerciseFileResource(AdminExerciseFileService exerciseFileService) {
18
        this.exerciseFileService = exerciseFileService;
19
    }
20
21
    @GetMapping("{ids}")
22
    List<ExerciseFileResponseDTO> findAll(@PathVariable List<Long> ids) {
23
        return exerciseFileService.findAll(ids);
24
    }
25
}
26