user.rb 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. Zammad::Application.routes.draw do
  3. api_path = Rails.configuration.api_path
  4. # users
  5. match api_path + '/users/search', to: 'users#search', via: %i[get post option]
  6. match api_path + '/users/password_reset', to: 'users#password_reset_send', via: :post
  7. match api_path + '/users/password_reset_verify', to: 'users#password_reset_verify', via: :post
  8. match api_path + '/users/password_change', to: 'users#password_change', via: :post
  9. match api_path + '/users/preferences', to: 'users#preferences', via: :put
  10. match api_path + '/users/out_of_office', to: 'users#out_of_office', via: :put
  11. match api_path + '/users/account', to: 'users#account_remove', via: :delete
  12. match api_path + '/users/import_example', to: 'users#import_example', via: :get
  13. match api_path + '/users/import', to: 'users#import_start', via: :post
  14. match api_path + '/users/avatar', to: 'users#avatar_new', via: :post
  15. match api_path + '/users/avatar', to: 'users#avatar_list', via: :get
  16. match api_path + '/users/avatar', to: 'users#avatar_destroy', via: :delete
  17. match api_path + '/users/avatar/set', to: 'users#avatar_set_default', via: :post
  18. match api_path + '/users/me', to: 'users#me', via: :get
  19. match api_path + '/users', to: 'users#index', via: :get
  20. match api_path + '/users/:id', to: 'users#show', via: :get
  21. match api_path + '/users/history/:id', to: 'users#history', via: :get
  22. match api_path + '/users', to: 'users#create', via: :post
  23. match api_path + '/users/:id', to: 'users#update', via: :put, as: 'api_v1_update_user'
  24. match api_path + '/users/:id', to: 'users#destroy', via: :delete, as: 'api_v1_delete_user'
  25. match api_path + '/users/image/:hash', to: 'users#image', via: :get
  26. match api_path + '/users/unlock/:id', to: 'users#unlock', via: :put
  27. match api_path + '/users/email_verify', to: 'users#email_verify', via: :post
  28. match api_path + '/users/email_verify_send', to: 'users#email_verify_send', via: :post
  29. match api_path + '/users/admin_password_auth', to: 'users#admin_password_auth_send', via: :post
  30. match api_path + '/users/admin_password_auth_verify', to: 'users#admin_password_auth_verify', via: :post
  31. end