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

    • allProfitsByGameId

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

      @PreAuthorize("hasRole('ROLE_USER')") @GetMapping("/all/gameid") public Iterable<Profit> allProfitsByGameId(@RequestParam Long gameId)
    • allProfitsByGameIdWithPagination

      @PreAuthorize("hasRole('ROLE_USER')") @GetMapping("/paged/gameid") public org.springframework.data.domain.Page<Profit> allProfitsByGameIdWithPagination(@RequestParam Long gameId, @RequestParam(defaultValue="0") int pageNumber, @RequestParam(defaultValue="7") int pageSize)
    • allProfitsByGameIdAndUserIdWithPagination

      @PreAuthorize("hasRole('ROLE_ADMIN')") @GetMapping("/paged") public org.springframework.data.domain.Page<Profit> allProfitsByGameIdAndUserIdWithPagination(@RequestParam Long userId, @RequestParam Long gameId, @RequestParam(defaultValue="0") int pageNumber, @RequestParam(defaultValue="7") int pageSize)