Class ClothingBrandsController

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

@RequestMapping("/api/clothingbrands") @RestController public class ClothingBrandsController extends ApiController
  • Constructor Details

    • ClothingBrandsController

      public ClothingBrandsController()
  • Method Details

    • allBrands

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<ClothingBrands> allBrands()
    • getById

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

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public ClothingBrands postBrands(@RequestParam String code, @RequestParam String brand, @RequestParam String price)
    • deleteBrands

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

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