2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
Zammad::Application.routes.draw do
|
|
|
|
api_path = Rails.configuration.api_path
|
2012-09-20 12:08:02 +00:00
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
# users
|
2018-02-20 04:29:30 +00:00
|
|
|
match api_path + '/users/search', to: 'users#search', via: %i[get post option]
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/users/password_reset', to: 'users#password_reset_send', via: :post
|
|
|
|
match api_path + '/users/password_reset_verify', to: 'users#password_reset_verify', via: :post
|
|
|
|
match api_path + '/users/password_change', to: 'users#password_change', via: :post
|
|
|
|
match api_path + '/users/preferences', to: 'users#preferences', via: :put
|
2017-09-05 09:49:32 +00:00
|
|
|
match api_path + '/users/out_of_office', to: 'users#out_of_office', via: :put
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/users/account', to: 'users#account_remove', via: :delete
|
2014-12-01 07:32:35 +00:00
|
|
|
|
2018-02-20 04:29:30 +00:00
|
|
|
match api_path + '/users/import_example', to: 'users#import_example', via: :get
|
|
|
|
match api_path + '/users/import', to: 'users#import_start', via: :post
|
|
|
|
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/users/avatar', to: 'users#avatar_new', via: :post
|
|
|
|
match api_path + '/users/avatar', to: 'users#avatar_list', via: :get
|
|
|
|
match api_path + '/users/avatar', to: 'users#avatar_destroy', via: :delete
|
|
|
|
match api_path + '/users/avatar/set', to: 'users#avatar_set_default', via: :post
|
2014-12-01 07:32:35 +00:00
|
|
|
|
2016-10-24 23:54:12 +00:00
|
|
|
match api_path + '/users/me', to: 'users#me', via: :get
|
|
|
|
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/users', to: 'users#index', via: :get
|
|
|
|
match api_path + '/users/:id', to: 'users#show', via: :get
|
|
|
|
match api_path + '/users/history/:id', to: 'users#history', via: :get
|
|
|
|
match api_path + '/users', to: 'users#create', via: :post
|
2018-07-09 06:51:58 +00:00
|
|
|
match api_path + '/users/:id', to: 'users#update', via: :put, as: 'api_v1_update_user'
|
|
|
|
match api_path + '/users/:id', to: 'users#destroy', via: :delete, as: 'api_v1_delete_user'
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/users/image/:hash', to: 'users#image', via: :get
|
2021-08-05 08:11:35 +00:00
|
|
|
match api_path + '/users/unlock/:id', to: 'users#unlock', via: :put
|
2012-09-20 12:08:02 +00:00
|
|
|
|
2016-06-01 14:58:11 +00:00
|
|
|
match api_path + '/users/email_verify', to: 'users#email_verify', via: :post
|
|
|
|
match api_path + '/users/email_verify_send', to: 'users#email_verify_send', via: :post
|
|
|
|
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|