diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 06:12:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 06:12:25 +0000 |
commit | 2bfa43cf3a8b0bb25a85066ff48db58f068bc493 (patch) | |
tree | 7ba5f89b4953742f025f5c8e0911cd1f964bb2e5 /config/routes | |
parent | 188f99dcc3de4678b308851d1cd8d26a200393cd (diff) | |
download | gitlab-ce-2bfa43cf3a8b0bb25a85066ff48db58f068bc493.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/profile.rb | 8 | ||||
-rw-r--r-- | config/routes/project.rb | 2 | ||||
-rw-r--r-- | config/routes/unmatched_project.rb | 8 | ||||
-rw-r--r-- | config/routes/uploads.rb | 18 |
4 files changed, 18 insertions, 18 deletions
diff --git a/config/routes/profile.rb b/config/routes/profile.rb index b8d4a0c49c2..91f6eb678e4 100644 --- a/config/routes/profile.rb +++ b/config/routes/profile.rb @@ -23,10 +23,10 @@ resource :profile, only: [:show, :update] do resource :notifications, only: [:show, :update] do scope(path: 'groups/*id', - id: Gitlab::PathRegex.full_namespace_route_regex, - as: :group, - controller: :groups, - constraints: { format: /(html|json)/ }) do + id: Gitlab::PathRegex.full_namespace_route_regex, + as: :group, + controller: :groups, + constraints: { format: /(html|json)/ }) do patch '/', action: :update put '/', action: :update end diff --git a/config/routes/project.rb b/config/routes/project.rb index 81510a9b34f..628fa3ad37b 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -29,7 +29,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # "Route Globbing" syntax (/*page) so that the route helpers do not encode # the slash character. get 'metrics(/:dashboard_path)(/*page)', constraints: { dashboard_path: /.+\.yml/, page: 'panel/new' }, - to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false + to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false namespace :metrics, module: :metrics do namespace :dashboards do diff --git a/config/routes/unmatched_project.rb b/config/routes/unmatched_project.rb index b4fe243c7b0..3f94af33e18 100644 --- a/config/routes/unmatched_project.rb +++ b/config/routes/unmatched_project.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true scope(path: '*namespace_id', - as: :namespace, - namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do + as: :namespace, + namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do scope(path: ':project_id', - constraints: { project_id: Gitlab::PathRegex.project_route_regex }, - as: :project) do + constraints: { project_id: Gitlab::PathRegex.project_route_regex }, + as: :project) do post '*all', to: 'application#route_not_found' put '*all', to: 'application#route_not_found' patch '*all', to: 'application#route_not_found' diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index a72730c1214..ba2e8493ef9 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -3,8 +3,8 @@ scope path: :uploads do # Note attachments and User/Group/Project/Topic avatars get "-/system/:model/:mounted_as/:id/:filename", - to: "uploads#show", - constraints: { model: %r{note|user|group|project|projects\/topic}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} } + to: "uploads#show", + constraints: { model: %r{note|user|group|project|projects\/topic}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} } # show uploads for models, snippets (notes) available for now get '-/system/:model/:id/:secret/:filename', @@ -18,8 +18,8 @@ scope path: :uploads do # Appearance get "-/system/:model/:mounted_as/:id/:filename", - to: "uploads#show", - constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ }, + to: "uploads#show", + constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ }, as: 'appearance_upload' # Project markdown uploads @@ -27,7 +27,7 @@ scope path: :uploads do # https://gitlab.com/gitlab-org/gitlab/issues/196396 get ":namespace_id/:project_id/:secret/:filename", to: redirect("%{namespace_id}/%{project_id}/uploads/%{secret}/%{filename}"), - constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil } + constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil } # create uploads for models, snippets (notes) available for now post ':model', @@ -41,12 +41,12 @@ scope path: :uploads do # Alert Metric Images get "-/system/:model/:mounted_as/:id/:filename", - to: "uploads#show", - constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} }, + to: "uploads#show", + constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} }, as: 'alert_metric_image_upload' end # Redirect old note attachments path to new uploads path. get "files/note/:id/:filename", - to: redirect("uploads/note/attachment/%{id}/%{filename}"), - constraints: { filename: %r{[^/]+} } + to: redirect("uploads/note/attachment/%{id}/%{filename}"), + constraints: { filename: %r{[^/]+} } |