Class UCSBOrganizationsController
java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.UCSBOrganizationsController
@RequestMapping("/api/ucsborganizations")
@RestController
public class UCSBOrganizationsController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteOrganization
(String orgCode) postOrganization
(String orgCode, String orgTranslationShort, String orgTranslation, boolean inactive) updateOrganizations
(String orgCode, @Valid UCSBOrganizations incoming) Methods inherited from class edu.ucsb.cs156.example.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
UCSBOrganizationsController
public UCSBOrganizationsController()
-
-
Method Details
-
allOrganizations
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<UCSBOrganizations> allOrganizations() -
getById
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public UCSBOrganizations getById(@RequestParam String orgCode) -
postOrganization
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBOrganizations postOrganization(@RequestParam String orgCode, @RequestParam String orgTranslationShort, @RequestParam String orgTranslation, @RequestParam boolean inactive) -
updateOrganizations
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public UCSBOrganizations updateOrganizations(@RequestParam String orgCode, @RequestBody @Valid @Valid UCSBOrganizations incoming) -
deleteOrganization
-