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