MayOneUS/mayday-2.0-backend

View on GitHub
app/controllers/v1/bills_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class V1::BillsController < V1::BaseController
  before_action :set_bill

  def supporter_counts
    render
  end

  def timeline
    render json: @bill.timeline
  end

  private

  def set_bill
    @bill = Bill.find_by(bill_id: params[:id]) || AllSupporters.new(chamber: params[:chamber])
  end
end