Class ProfitsController

java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.ProfitsController

@RequestMapping("/api/profits") @RestController public class ProfitsController extends ApiController
  • Constructor Details

    • ProfitsController

      public ProfitsController()
  • Method Details

    • allProfitsByCommonsId

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all") public Iterable<Profit> allProfitsByCommonsId(@RequestParam Long userId, @RequestParam Long commonsId)
    • allProfitsByCommonsId

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all/commonsid") public Iterable<Profit> allProfitsByCommonsId(@RequestParam Long commonsId)
    • allProfitsByCommonsIdWithPagination

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/paged/commonsid") public org.springframework.data.domain.Page<Profit> allProfitsByCommonsIdWithPagination(@RequestParam Long commonsId, @RequestParam(defaultValue="0") int pageNumber, @RequestParam(defaultValue="7") int pageSize)