]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Use resourceful routes for api trace create
[rails.git] / config / routes.rb
index cf5a380666b79891ba7ed824b9667abb6c032e4b..3fe62dcb33eaca088e94c440cac705d28fa314d4 100644 (file)
@@ -87,12 +87,12 @@ OpenStreetMap::Application.routes.draw do
 
     post "/user/messages/:id" => "messages#update", :as => :api_message_update
 
-    post "gpx/create" => "traces#create"
     get "gpx/:id/data" => "traces#data", :as => :api_trace_data
   end
 
   namespace :api, :path => "api/0.6" do
-    resources :traces, :path => "gpx", :only => [:show, :update, :destroy], :id => /\d+/
+    resources :traces, :path => "gpx", :only => [:create, :show, :update, :destroy], :id => /\d+/
+    post "gpx/create" => "traces#create", :id => /\d+/, :as => :trace_create
     get "gpx/:id/details" => "traces#show", :id => /\d+/, :as => :trace_details
 
     # Map notes API