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