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

      def index
        if params[:ids]
          @sip_accounts = SipAccount.where(:id => params[:ids])
        else
          @sip_accounts = SipAccount.all
        end

        respond_with @sip_accounts
      end

      def show
        @sip_account = SipAccount.find(params[:id])

        respond_with @sip_account
      end  
    end
  end
end