Class UCSBDiningCommonsController

java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.UCSBDiningCommonsController

@RequestMapping("/api/ucsbdiningcommons") @RestController public class UCSBDiningCommonsController extends ApiController
  • Constructor Details

    • UCSBDiningCommonsController

      public UCSBDiningCommonsController()
  • Method Details

    • allCommonss

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<UCSBDiningCommons> allCommonss()
    • postCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public UCSBDiningCommons postCommons(@RequestParam String code, @RequestParam String name, @RequestParam boolean hasSackMeal, @RequestParam boolean hasTakeOutMeal, @RequestParam boolean hasDiningCam, @RequestParam double latitude, @RequestParam double longitude)
    • getById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public UCSBDiningCommons getById(@RequestParam String code)
    • deleteCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("") public Object deleteCommons(@RequestParam String code)
    • updateCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public UCSBDiningCommons updateCommons(@RequestParam String code, @RequestBody @Valid @Valid UCSBDiningCommons incoming)