From: Anton Khorev Date: Fri, 26 Jul 2024 00:01:08 +0000 (+0300) Subject: Move notes and blocks resources to api namespace X-Git-Tag: live~343^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a67fdc7d28b0317835337bfce578259fdcc0118f Move notes and blocks resources to api namespace --- diff --git a/config/routes.rb b/config/routes.rb index 12f6325ae..c832cbb35 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -84,9 +84,11 @@ OpenStreetMap::Application.routes.draw do delete "gpx/:id" => "traces#destroy", :id => /\d+/ get "gpx/:id/details" => "traces#show", :id => /\d+/ get "gpx/:id/data" => "traces#data", :as => :api_trace_data + end + namespace :api, :path => "api/0.6" do # Map notes API - resources :notes, :except => [:new, :edit, :update], :constraints => { :id => /\d+/ }, :controller => "notes", :as => :api_notes do + resources :notes, :except => [:new, :edit, :update], :id => /\d+/, :controller => "notes" do collection do get "search" get "feed", :defaults => { :format => "rss" } @@ -99,7 +101,7 @@ OpenStreetMap::Application.routes.draw do end end - resources :user_blocks, :only => [:show], :constraints => { :id => /\d+/ }, :controller => "user_blocks", :as => :api_user_blocks + resources :user_blocks, :only => :show, :id => /\d+/, :controller => "user_blocks" end # Data browsing