Sha256: 573907e6d638b191667bea9dc0cc16f0467de8d8c2d936104dea624ebc449980

Contents?: true

Size: 355 Bytes

Versions: 5

Compression:

Stored size: 355 Bytes

Contents

class JobsController < ApplicationController

  def pop
    render json: Job.pop
  end

  def index
    render json: current_entity.jobs
  end

  def show
    render json: current_entity.jobs.find(params[:id]), show_all: true
  end

  def update_status
    Job.find_by!(key: params[:id]).update!(status: params[:status])
    render plain: 'OK'
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jobs-api-0.2.1 app/controllers/jobs_controller.rb
jobs-api-0.2.0 app/controllers/jobs_controller.rb
jobs-api-0.1.2 app/controllers/jobs_controller.rb
jobs-api-0.1.1 app/controllers/jobs_controller.rb
jobs-api-0.1.0 app/controllers/jobs_controller.rb