Class UCSBAPIQuarterController
java.lang.Object
edu.ucsb.cs156.courses.controllers.ApiController
edu.ucsb.cs156.courses.controllers.UCSBAPIQuarterController
@RestController
@RequestMapping("/api/public")
public class UCSBAPIQuarterController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class edu.ucsb.cs156.courses.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException, handleIllegalArgumentException
-
Constructor Details
-
UCSBAPIQuarterController
public UCSBAPIQuarterController()
-
-
Method Details
-
getCurrentQuarter
@GetMapping(value="/currentQuarter", produces="application/json") public UCSBAPIQuarter getCurrentQuarter() throws Exception- Throws:
Exception
-
getAllQuarters
@GetMapping(value="/allQuarters", produces="application/json") public List<UCSBAPIQuarter> getAllQuarters() throws Exception- Throws:
Exception
-
loadQuarters
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/loadQuarters") public List<UCSBAPIQuarter> loadQuarters() throws Exception- Throws:
Exception
-