Module: Rhoconnect::Handler::Changes

Defined in:
lib/rhoconnect/handler/changes.rb,
lib/rhoconnect/handler/changes/hooks.rb,
lib/rhoconnect/handler/changes/engine.rb,
lib/rhoconnect/handler/changes/runner.rb,
lib/rhoconnect/handler/changes/execute_methods.rb,
lib/rhoconnect/handler/changes/pass_through_runner.rb

Defined Under Namespace

Modules: ExecuteMethods, Hooks Classes: Engine, PassThroughRunner, Runner

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/rhoconnect/handler/changes.rb', line 11

def self.registered(app)
	# CUD
 app.post "/", :rc_handler => :cud, :login_required => true, :admin_required => false,
                  :source_required => true, :client_required => true, 
               :deprecated_route => {:verb => :post, :url => ['/api/application', '/application', '/api/application/queue_updates']} do
   operation = params[:operation]
   @model.send operation.to_sym, params["#{operation}_object".to_sym]
 end

 app.put "/:id", :rc_handler => :update, :login_required => true, :admin_required => false,
                    :source_required => true, :client_required => true do
   @model.update(params[:update_object])
 end

 app.delete "/:id", :rc_handler => :delete, :login_required => true, :admin_required => false,
                       :source_required => true, :client_required => true do
   @model.delete(params[:delete_object])
 end
end