2012-09-20 12:08:02 +00:00
|
|
|
module ExtraRoutes
|
2013-08-06 22:10:28 +00:00
|
|
|
def add(map, api_path)
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
# users
|
2013-08-06 22:10:28 +00:00
|
|
|
map.match api_path + '/users/search', :to => 'users#search', :via => [:get, :post]
|
|
|
|
map.match api_path + '/users/password_reset', :to => 'users#password_reset_send', :via => :post
|
|
|
|
map.match api_path + '/users/password_reset_verify', :to => 'users#password_reset_verify', :via => :post
|
|
|
|
map.match api_path + '/users/password_change', :to => 'users#password_change', :via => :post
|
|
|
|
map.match api_path + '/users/preferences', :to => 'users#preferences', :via => :put
|
|
|
|
map.match api_path + '/users/account', :to => 'users#account_remove', :via => :delete
|
|
|
|
map.match api_path + '/users', :to => 'users#index', :via => :get
|
|
|
|
map.match api_path + '/users/:id', :to => 'users#show', :via => :get
|
|
|
|
map.match api_path + '/users', :to => 'users#create', :via => :post
|
|
|
|
map.match api_path + '/users/:id', :to => 'users#update', :via => :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
module_function :add
|
|
|
|
end
|