com.osomapps.pt.admin.user.AdminUserGoalResource   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() 0 3 1
A AdminUserGoalResource(AdminUserGoalService) 0 3 1
1
package com.osomapps.pt.admin.user;
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.RequestMapping;
7
import org.springframework.web.bind.annotation.RestController;
8
9
@RestController
10
@RequestMapping("api/v1/admin/user-goal")
11
class AdminUserGoalResource {
12
13
    private final AdminUserGoalService userGoalService;
14
15
    @Autowired
16
    AdminUserGoalResource(AdminUserGoalService userGoalService) {
17
        this.userGoalService = userGoalService;
18
    }
19
20
    @GetMapping
21
    List<UserGoalResponseDTO> findAll() {
22
        return userGoalService.findAll();
23
    }
24
}
25