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