summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1/calls_controller.rb
blob: e6fbed45980feed7238f8ffc556a25d10117ab9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Api
  module V1
    class CallsController < ApplicationController
      respond_to :json

      def index
        @calls = Call.limit(10)

        respond_with @calls
      end

      def show
        @call = Call.find(params[:id])

        if params[:transfer_blind]
          @call.transfer_blind(params[:transfer_blind])
        end

        respond_with @call
      end

    end
  end
end