1 | package edu.ucsb.cs156.example.controllers; | |
2 | ||
3 | import edu.ucsb.cs156.example.models.SystemInfo; | |
4 | import edu.ucsb.cs156.example.services.SystemInfoService; | |
5 | import io.swagger.v3.oas.annotations.Operation; | |
6 | import io.swagger.v3.oas.annotations.tags.Tag; | |
7 | ||
8 | import org.springframework.beans.factory.annotation.Autowired; | |
9 | import org.springframework.web.bind.annotation.GetMapping; | |
10 | import org.springframework.web.bind.annotation.RequestMapping; | |
11 | import org.springframework.web.bind.annotation.RestController; | |
12 | ||
13 | /** | |
14 | * This is a REST controller for getting information about the system. | |
15 | * | |
16 | * It allows frontend access to some of the global values set in the | |
17 | * backend of the application, some of which are set by environment | |
18 | * variables. | |
19 | * | |
20 | * For more information see the SystemInfoService and SystemInfo classes. | |
21 | * | |
22 | * @see edu.ucsb.cs156.example.services.SystemInfoService | |
23 | * @see edu.ucsb.cs156.example.models.SystemInfo | |
24 | */ | |
25 | ||
26 | @Tag(name = "System Information") | |
27 | @RequestMapping("/api/systemInfo") | |
28 | @RestController | |
29 | public class SystemInfoController extends ApiController { | |
30 | ||
31 | @Autowired | |
32 | private SystemInfoService systemInfoService; | |
33 | ||
34 | /** | |
35 | * This method returns the system information. | |
36 | * @return the system information | |
37 | */ | |
38 | ||
39 | @Operation(summary = "Get global information about the application") | |
40 | @GetMapping("") | |
41 | public SystemInfo getSystemInfo() { | |
42 |
1
1. getSystemInfo : replaced return value with null for edu/ucsb/cs156/example/controllers/SystemInfoController::getSystemInfo → KILLED |
return systemInfoService.getSystemInfo(); |
43 | } | |
44 | ||
45 | } | |
Mutations | ||
42 |
1.1 |