Class: GroundControl::Api::DiscardsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ground_control/api/discards_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
# File 'app/controllers/ground_control/api/discards_controller.rb', line 6

def create
  job = ActiveJob.jobs.find_by_id(params[:job_id])
  job.discard

  render json: { message: "Discarded job #{job.job_id}" }
end