Sha256: 964dfaf588187ebc3102d1aa43c718cfc33965b48f62e2e72cac30eadf35c5a5
Contents?: true
Size: 726 Bytes
Versions: 12
Compression:
Stored size: 726 Bytes
Contents
module MotherBrain::API class V1 class JobsEndpoint < MB::API::Endpoint helpers MB::API::Helpers rescue_from MB::JobNotFound do |ex| rack_response(ex.to_json, 404, "Content-type" => "application/json") end namespace 'jobs' do desc "list all jobs (completed and active)" get do job_manager.list.to_a end desc "list all active jobs" get 'active' do job_manager.active end desc "find and return the Job with the given ID" params do requires :job_id, type: String, desc: "job id" end get ':job_id' do find_job!(params[:job_id]) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems