| 1 | package edu.ucsb.cs156.courses.controllers; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.core.JsonProcessingException; | |
| 4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 5 | import edu.ucsb.cs156.courses.repositories.UserRepository; | |
| 6 | import edu.ucsb.cs156.courses.services.UCSBCurriculumService; | |
| 7 | import lombok.extern.slf4j.Slf4j; | |
| 8 | import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | import org.springframework.http.ResponseEntity; | |
| 10 | import org.springframework.web.bind.annotation.GetMapping; | |
| 11 | import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | import org.springframework.web.bind.annotation.RequestParam; | |
| 13 | import org.springframework.web.bind.annotation.RestController; | |
| 14 | ||
| 15 | @Slf4j | |
| 16 | @RestController | |
| 17 | @RequestMapping("/api/finalsInfo") | |
| 18 | public class UCSBFinalExamController { | |
| 19 | ||
| 20 | private ObjectMapper mapper = new ObjectMapper(); | |
| 21 | ||
| 22 | @Autowired UserRepository userRepository; | |
| 23 | ||
| 24 | @Autowired UCSBCurriculumService ucsbCurriculumService; | |
| 25 | ||
| 26 | @GetMapping(value = "", produces = "application/json") | |
| 27 | public ResponseEntity<String> finalsinfo(@RequestParam String qxx, @RequestParam String enrollCd) | |
| 28 | throws JsonProcessingException { | |
| 29 | ||
| 30 | String body = ucsbCurriculumService.getFinalExamInfo(qxx, enrollCd); | |
| 31 | ||
| 32 |
1
1. finalsinfo : replaced return value with null for edu/ucsb/cs156/courses/controllers/UCSBFinalExamController::finalsinfo → KILLED |
return ResponseEntity.ok().body(body); |
| 33 | } | |
| 34 | } | |
Mutations | ||
| 32 |
1.1 |