[PATCH conductor 17/20] Adds XML format for destroy of Provider
pblaho at redhat.com
pblaho at redhat.com
Fri Jun 8 00:38:10 UTC 2012
From: Petr Blaho <pblaho at redhat.com>
https://www.aeolusproject.org/redmine/issues/3250
Adds route to DELETE api/providers => ProvidersController#destroy
---
src/app/controllers/providers_controller.rb | 2 ++
src/config/routes.rb | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb
index a741d6e..cfadb5a 100644
--- a/src/app/controllers/providers_controller.rb
+++ b/src/app/controllers/providers_controller.rb
@@ -184,6 +184,8 @@ class ProvidersController < ApplicationController
respond_to do |format|
format.html { redirect_to providers_path }
+ # FIXME: what to return in body of response, if anything?
+ format.xml { render :text => '<message>OK</message>', :status => 200 }
end
end
diff --git a/src/config/routes.rb b/src/config/routes.rb
index 4f9cc69..0a8ff00 100644
--- a/src/config/routes.rb
+++ b/src/config/routes.rb
@@ -265,7 +265,7 @@ Conductor::Application.routes.draw do
end
scope "/api" do
- resources :providers, :as => 'api_providers', :only => [:index, :show, :create]
+ resources :providers, :as => 'api_providers', :only => [:index, :show, :create, :destroy]
resources :provider_accounts, :as => 'api_provider_accounts', :only => [:index, :show]
resources :provider_types, :as => 'api_provider_types', :only => [:index, :show]
end
--
1.7.7.6
More information about the aeolus-devel
mailing list