| 1 | package edu.ucsb.cs156.courses.controllers; | |
| 2 | ||
| 3 | import edu.ucsb.cs156.courses.services.CourseDataAvailabilityService; | |
| 4 | import java.util.List; | |
| 5 | import lombok.RequiredArgsConstructor; | |
| 6 | import org.springframework.web.bind.annotation.PostMapping; | |
| 7 | import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | import org.springframework.web.bind.annotation.RequestParam; | |
| 9 | import org.springframework.web.bind.annotation.RestController; | |
| 10 | ||
| 11 | /** Separate from search results so availability failures cannot discard otherwise valid matches. */ | |
| 12 | @RestController | |
| 13 | @RequestMapping("/api/public/course-data") | |
| 14 | @RequiredArgsConstructor | |
| 15 | public class CourseDataAvailabilityController { | |
| 16 | private final CourseDataAvailabilityService availability; | |
| 17 | ||
| 18 | @PostMapping("/ensure") | |
| 19 | public List<String> ensure( | |
| 20 | @RequestParam String startQtr, | |
| 21 | @RequestParam String endQtr, | |
| 22 | @RequestParam(required = false) String subjectArea) { | |
| 23 |
1
1. ensure : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/CourseDataAvailabilityController::ensure → KILLED |
return availability.warnings(startQtr, endQtr, subjectArea); |
| 24 | } | |
| 25 | } | |
Mutations | ||
| 23 |
1.1 |