summaryrefslogtreecommitdiff
path: root/config/routes/profile.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-05 15:21:27 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-05 15:21:27 +0300
commitf223a41660f1a629614d3d559468b1a5488b96d8 (patch)
treef253bba0103d951980811f0563bc7c07657d2fdc /config/routes/profile.rb
parent3fd5ea3d4362e6946f8502bb30825cc14013b374 (diff)
downloadgitlab-ce-f223a41660f1a629614d3d559468b1a5488b96d8.tar.gz
Split routes on multiple filesdz-split-routes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config/routes/profile.rb')
-rw-r--r--config/routes/profile.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/config/routes/profile.rb b/config/routes/profile.rb
new file mode 100644
index 00000000000..4cb68c9b34a
--- /dev/null
+++ b/config/routes/profile.rb
@@ -0,0 +1,43 @@
+resource :profile, only: [:show, :update] do
+ member do
+ get :audit_log
+ get :applications, to: 'oauth/applications#index'
+
+ put :reset_private_token
+ put :update_username
+ end
+
+ scope module: :profiles do
+ resource :account, only: [:show] do
+ member do
+ delete :unlink
+ end
+ end
+ resource :notifications, only: [:show, :update]
+ resource :password, only: [:new, :create, :edit, :update] do
+ member do
+ put :reset
+ end
+ end
+ resource :preferences, only: [:show, :update]
+ resources :keys, only: [:index, :show, :new, :create, :destroy]
+ resources :emails, only: [:index, :create, :destroy]
+ resource :avatar, only: [:destroy]
+
+ resources :personal_access_tokens, only: [:index, :create] do
+ member do
+ put :revoke
+ end
+ end
+
+ resource :two_factor_auth, only: [:show, :create, :destroy] do
+ member do
+ post :create_u2f
+ post :codes
+ patch :skip
+ end
+ end
+
+ resources :u2f_registrations, only: [:destroy]
+ end
+end