get "user/details" => "users#details"
get "user/gpx_files" => "users#gpx_files"
get "users" => "users#index", :as => :api_users
+ end
- resources :user_preferences, :except => [:new, :create, :edit], :param => :preference_key, :path => "user/preferences", :controller => "user_preferences" do
+ namespace :api, :path => "api/0.6" do
+ resources :user_preferences, :except => [:new, :create, :edit], :param => :preference_key, :path => "user/preferences" do
collection do
put "" => "user_preferences#update_all", :as => ""
end
end
- resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :destroy], :controller => "messages", :as => :api_messages do
- collection do
- get "inbox"
- get "outbox"
- end
+ resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :update, :destroy]
+ namespace :messages, :path => "user/messages" do
+ resource :inbox, :only => :show
+ resource :outbox, :only => :show
end
+ post "/user/messages/:id" => "messages#update", :as => nil
- post "/user/messages/:id" => "messages#update", :as => :api_message_update
- end
-
- namespace :api, :path => "api/0.6" do
resources :traces, :path => "gpx", :only => [:create, :show, :update, :destroy], :id => /\d+/ do
scope :module => :traces do
resource :data, :only => :show
get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history
resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show
resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do
- match :subscribe, :unsubscribe, :on => :member, :via => [:get, :post]
+ match :subscribe, :on => :member, :via => [:get, :post]
+ match :unsubscribe, :on => :member, :via => [:get, :post]
namespace :changeset_comments, :as => :comments, :path => :comments do
resource :feed, :only => :show, :defaults => { :format => "rss" }
scope "/user/:display_name" do
resources :diary_entries, :path => "diary", :only => [:edit, :update, :show], :id => /\d+/ do
member do
- post :hide, :unhide
+ post :hide
+ post :unhide
end
end
end
match "/user/:display_name/remove_friend" => "friendships#remove_friend", :via => [:get, :post], :as => "remove_friend"
# user lists
- match "/users" => "users#index", :via => [:get, :post]
- match "/users/:status" => "users#index", :via => [:get, :post]
+ namespace :users do
+ resource :list, :path => "(:status)", :only => [:show, :update]
+ end
# geocoder
get "/search" => "geocoder#search"
# banning pages
get "/user/:display_name/blocks" => "user_blocks#blocks_on", :as => "user_blocks_on"
get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by"
- get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block"
- resources :user_blocks, :except => :new
+ resources :user_blocks, :path_names => { :new => "new/:display_name" }
match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks"
# issues and reports