incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH 2/3] Restores explicit route for getting the 'new_blob' form. A naming clash with GET /api/buckets/:bucket/:blob meant that the 'new_blob' operation under buckets collection was never triggered.
Date Fri, 19 Aug 2011 12:42:30 GMT
From: marios <marios@redhat.com>


Signed-off-by: marios <marios@redhat.com>
---
 server/server.rb |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/server/server.rb b/server/server.rb
index 231a89e..e302331 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -786,6 +786,14 @@ put "#{Sinatra::UrlForHelper::DEFAULT_URI_PREFIX}/buckets/:bucket/:blob"
do
   end
 end
 
+#get html form for creating a new blob
+get "#{Sinatra::UrlForHelper::DEFAULT_URI_PREFIX}/buckets/:bucket/new_blob" do
+  @bucket_id = params[:bucket]
+  respond_to do |format|
+    format.html {haml :"blobs/new"}
+  end
+end
+
 #create a new blob using html interface - NON STREAMING (i.e. browser POST http form data)
 post "#{Sinatra::UrlForHelper::DEFAULT_URI_PREFIX}/buckets/:bucket" do
   bucket_id = params[:bucket]
@@ -897,16 +905,6 @@ collection :buckets do
     end
   end
 
-  operation :new_bucket, :form => true, :method => :get, :member => true do
-    param :bucket,  :string
-    control do
-      @bucket_id = params[:bucket]
-      respond_to do |format|
-        format.html {haml :"blobs/new"}
-      end
-    end
-  end
-
   operation :index do
     description "List buckets associated with this account"
     with_capability :buckets
-- 
1.7.3.4


Mime
View raw message