1 | package edu.ucsb.cs156.happiercows.controllers; | |
2 | ||
3 | import edu.ucsb.cs156.happiercows.models.SystemInfo; | |
4 | import edu.ucsb.cs156.happiercows.services.SystemInfoService; | |
5 | import io.swagger.annotations.Api; | |
6 | import io.swagger.annotations.ApiOperation; | |
7 | ||
8 | import org.springframework.beans.factory.annotation.Autowired; | |
9 | import org.springframework.security.access.prepost.PreAuthorize; | |
10 | import org.springframework.web.bind.annotation.GetMapping; | |
11 | import org.springframework.web.bind.annotation.RequestMapping; | |
12 | import org.springframework.web.bind.annotation.RestController; | |
13 | ||
14 | @Api(description = "System Information") | |
15 | @RequestMapping("/api/systemInfo") | |
16 | @RestController | |
17 | public class SystemInfoController extends ApiController { | |
18 | ||
19 | @Autowired | |
20 | private SystemInfoService systemInfoService; | |
21 | ||
22 | @ApiOperation(value = "Get global information about the application") | |
23 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
24 | @GetMapping("") | |
25 | public SystemInfo getSystemInfo() { | |
26 |
1
1. getSystemInfo : replaced return value with null for edu/ucsb/cs156/happiercows/controllers/SystemInfoController::getSystemInfo → KILLED |
return systemInfoService.getSystemInfo(); |
27 | } | |
28 | ||
29 | } | |
Mutations | ||
26 |
1.1 |