| 1 | package edu.ucsb.cs156.dining.controllers; | |
| 2 | ||
| 3 | import edu.ucsb.cs156.dining.entities.UCSBAPIDiningCommons; | |
| 4 | import edu.ucsb.cs156.dining.services.UCSBAPIDiningCommonsService; | |
| 5 | import io.swagger.v3.oas.annotations.Operation; | |
| 6 | import io.swagger.v3.oas.annotations.tags.Tag; | |
| 7 | import lombok.extern.slf4j.Slf4j; | |
| 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 | import java.util.List; | |
| 14 | ||
| 15 | /** Controller for UCSB Dining Commons API */ | |
| 16 | @Tag(name = "UCSBAPIDiningCommonsController") | |
| 17 | @RestController | |
| 18 | @RequestMapping("/api/diningcommons") | |
| 19 | @Slf4j | |
| 20 | public class UCSBAPIDiningCommonsController { | |
| 21 | ||
| 22 |   @Autowired | |
| 23 |   private UCSBAPIDiningCommonsService diningCommonsService; | |
| 24 | ||
| 25 |   @Operation(summary = "Get all dining commons from UCSB API") | |
| 26 |   @GetMapping("/all") | |
| 27 |   public List<UCSBAPIDiningCommons> getAllDiningCommons() throws Exception { | |
| 28 | 
1
1. getAllDiningCommons : replaced return value with Collections.emptyList for edu/ucsb/cs156/dining/controllers/UCSBAPIDiningCommonsController::getAllDiningCommons → KILLED | 
    return diningCommonsService.getAllDiningCommons(); | 
| 29 |   } | |
| 30 | } | |
Mutations | ||
| 28 | 
 
 1.1  |