* adding test method to check 'local' behavior
This commit is contained in:
parent
5a51bae5fd
commit
8d0faa9b81
|
|
@ -1,11 +1,16 @@
|
|||
class ApiIcecastController < ApiController
|
||||
#before_filter :local_only
|
||||
before_filter :parse_mount
|
||||
before_filter :local_only, :only => [:test]
|
||||
before_filter :parse_mount, :except => [:test]
|
||||
|
||||
# each request will have this in it, if it's icecast.
|
||||
#user-agent = Icecast 2.3.3
|
||||
|
||||
|
||||
def test
|
||||
puts "========= GOT IT======="
|
||||
render text: 'GOT IT', :status => :ok
|
||||
end
|
||||
|
||||
def mount_add
|
||||
mount = IcecastMount.find_by_name!(@mount_id)
|
||||
mount.source_up
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ SampleApp::Application.routes.draw do
|
|||
match '/feedback' => 'api_corporate#feedback', :via => :post
|
||||
|
||||
# icecast urls
|
||||
match '/icecast/test' => 'api_icecast#test', :via => :get
|
||||
match '/icecast/mount_add' => 'api_icecast#mount_add', :via => :post
|
||||
match '/icecast/mount_remove' => 'api_icecast#mount_remove', :via => :post
|
||||
match '/icecast/listener_add' => 'api_icecast#listener_add', :via => :post
|
||||
|
|
|
|||
Loading…
Reference in New Issue