Class JobsController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.JobsController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallJobs()
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
-
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()
-