Class JobsController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.JobsController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallJobs()
org.springframework.data.domain.Page<Job>
allJobsPaged
(int page, int size) instructorReportSingleCommons
(Long commonsId) launchTestJob
(Boolean fail, Integer sleepMs) setCowHealth
(Long commonsID, double health) Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException
-
Constructor Details
-
JobsController
public JobsController()
-
-
Method Details
-
allJobs
-
allJobsPaged
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all/pageable") public org.springframework.data.domain.Page<Job> allJobsPaged(@RequestParam int page, @RequestParam int size) -
launchTestJob
-
launchTestJob
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/milkthecowjob") public Job launchTestJob() -
updateCowHealth
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/updatecowhealth") public Job updateCowHealth() -
setCowHealth
-
instructorReport
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/instructorreport") public Job instructorReport() -
instructorReportSingleCommons
-