Class UCSBDiningCommonsMenuItemsController
java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.UCSBDiningCommonsMenuItemsController
@RequestMapping("/api/ucsbdiningcommonsmenuitems")
@RestController
public class UCSBDiningCommonsMenuItemsController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpostCommonsMenuItems
(String diningCommonsCode, String name, String station) updateCommonsMenuItems
(Long id, @Valid UCSBDiningCommonsMenuItems incoming) Methods inherited from class edu.ucsb.cs156.example.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
UCSBDiningCommonsMenuItemsController
public UCSBDiningCommonsMenuItemsController()
-
-
Method Details
-
allCommonsMenuItems
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<UCSBDiningCommonsMenuItems> allCommonsMenuItems() -
postCommonsMenuItems
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBDiningCommonsMenuItems postCommonsMenuItems(@RequestParam String diningCommonsCode, @RequestParam String name, @RequestParam String station) -
getById
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public UCSBDiningCommonsMenuItems getById(@RequestParam Long id) -
deleteCommonsMenuItems
-
updateCommonsMenuItems
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public UCSBDiningCommonsMenuItems updateCommonsMenuItems(@RequestParam Long id, @RequestBody @Valid @Valid UCSBDiningCommonsMenuItems incoming)
-