Class SchoolsController
java.lang.Object
edu.ucsb.cs156.organic.controllers.ApiController
edu.ucsb.cs156.organic.controllers.SchoolsController
@RequestMapping("/api/Schools")
@RestController
public class SchoolsController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteSchool
(Long id) updateSchool
(Long id, @Valid School incoming) Methods inherited from class edu.ucsb.cs156.organic.controllers.ApiController
genericMessage, getCurrentUser, getMapper, handleAccessDeniedException, handleGenericException, handleIllegalArgumentException, mapperThatIgnoresMockitoMocks
-
Constructor Details
-
SchoolsController
public SchoolsController()
-
-
Method Details
-
allSchools
-
postSchool
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public School postSchool(@RequestParam String abbrev, @RequestParam String name, @RequestParam String termRegex, @RequestParam String termDescription, @RequestParam String termError) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getById
-
deleteSchool
-
updateSchool
-