2012-09-20 12:08:02 +00:00
|
|
|
module ExtraRoutes
|
|
|
|
def add(map)
|
|
|
|
|
|
|
|
# users
|
2013-02-10 21:38:35 +00:00
|
|
|
map.match '/api/users/search', :to => 'users#search', :via => [:get, :post]
|
|
|
|
map.match '/api/users/password_reset', :to => 'users#password_reset_send', :via => :post
|
2012-11-11 22:51:44 +00:00
|
|
|
map.match '/api/users/password_reset_verify', :to => 'users#password_reset_verify', :via => :post
|
2013-02-10 21:38:35 +00:00
|
|
|
map.match '/api/users/password_change', :to => 'users#password_change', :via => :post
|
2013-02-12 00:56:23 +00:00
|
|
|
map.match '/api/users/preferences', :to => 'users#preferences', :via => :put
|
2013-02-10 21:38:35 +00:00
|
|
|
map.match '/api/users', :to => 'users#index', :via => :get
|
|
|
|
map.match '/api/users/:id', :to => 'users#show', :via => :get
|
|
|
|
map.match '/api/users', :to => 'users#create', :via => :post
|
|
|
|
map.match '/api/users/:id', :to => 'users#update', :via => :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
module_function :add
|
|
|
|
end
|