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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteBrands
(String code) postBrands
(String code, String brand, String price) updateBrands
(String code, @Valid ClothingBrands incoming) Methods inherited from class edu.ucsb.cs156.example.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
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
-
updateBrands
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public ClothingBrands updateBrands(@RequestParam String code, @RequestBody @Valid @Valid ClothingBrands incoming)
-