Class: Asyncapi::Client::V1::JobsController
- Inherits:
-
Object
- Object
- Asyncapi::Client::V1::JobsController
- Defined in:
- app/controllers/asyncapi/client/v1/jobs_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 |
# File 'app/controllers/asyncapi/client/v1/jobs_controller.rb', line 5 def index jobs = Job.all paginate json: jobs end |
#update ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/asyncapi/client/v1/jobs_controller.rb', line 10 def update if job = Job.find_by(id: params[:id], secret: params[:job][:secret]) UpdateJob.execute(job: job, params: job_params) render json: job else render nothing: true, status: 403 end end |