diff options
author | Peter Kozak <spag@golwen.net> | 2013-06-22 10:22:48 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-06-22 10:22:48 +0200 |
commit | 08ecc91d89a2b6a83daee4a1ffda5520e38e53c6 (patch) | |
tree | 2f15799d3948eaa26abacef033c687b4362f602b /app/controllers | |
parent | d21bf5513aa28187deb6b6c1ba21635b97ff82a4 (diff) | |
parent | 4ce04ec03bc8f362d48ded43833645e7f454cb5c (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/calls_controller.rb | 24 | ||||
-rw-r--r-- | app/controllers/switchboard_entries_controller.rb | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/app/controllers/api/v1/calls_controller.rb b/app/controllers/api/v1/calls_controller.rb new file mode 100644 index 0000000..e6fbed4 --- /dev/null +++ b/app/controllers/api/v1/calls_controller.rb @@ -0,0 +1,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 diff --git a/app/controllers/switchboard_entries_controller.rb b/app/controllers/switchboard_entries_controller.rb index ef6c72e..5b41816 100644 --- a/app/controllers/switchboard_entries_controller.rb +++ b/app/controllers/switchboard_entries_controller.rb @@ -58,7 +58,7 @@ class SwitchboardEntriesController < ApplicationController private def switchboard_entry_params - params.require(:switchboard_entry).permit(:name, :sip_account_id) + params.require(:switchboard_entry).permit(:name, :sip_account_id, :switchable) end def spread_breadcrumbs |