Class JobsController

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

@RequestMapping("/api/jobs") @RestController public class JobsController extends ApiController
  • Constructor Details

    • JobsController

      public JobsController()
  • Method Details

    • allJobs

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all") public Iterable<Job> allJobs()
    • launchTestJob

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/testjob") public Job launchTestJob(@RequestParam Boolean fail, @RequestParam Integer sleepMs)
    • launchTestJob

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/milkthecowjob") public Job launchTestJob()
    • updateCowHealth

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/updatecowhealth") public Job updateCowHealth()
    • instructorReport

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/launch/instructorreport") public Job instructorReport()