user.rb 722 B

123456789101112131415
  1. module ExtraRoutes
  2. def add(map)
  3. # users
  4. map.match '/api/users/search', :to => 'users#search', :via => [:get, :post]
  5. map.match '/api/users/password_reset', :to => 'users#password_reset_send', :via => :post
  6. map.match '/api/users/password_reset_verify', :to => 'users#password_reset_verify', :via => :post
  7. map.match '/api/users', :to => 'users#index', :via => :get
  8. map.match '/api/users/:id', :to => 'users#show', :via => :get
  9. map.match '/api/users', :to => 'users#create', :via => :post
  10. map.match '/api/users/:id', :to => 'users#update', :via => :put
  11. end
  12. module_function :add
  13. end