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