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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallProfitsByGameId(Long gameId) allProfitsByGameId(Long userId, Long gameId) org.springframework.data.domain.Page<Profit> allProfitsByGameIdAndUserIdWithPagination(Long userId, Long gameId, int pageNumber, int pageSize) org.springframework.data.domain.Page<Profit> allProfitsByGameIdWithPagination(Long gameId, int pageNumber, int pageSize) Methods inherited from class ApiController
genericMessage, getCurrentUser, handleBadRequest, handleForbidden, handleGenericException
-
Constructor Details
-
ProfitsController
public ProfitsController()
-
-
Method Details
-
allProfitsByGameId
-
allProfitsByGameId
-
allProfitsByGameIdWithPagination
-
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)
-