summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-04 15:54:16 +0100
committerPhil Hughes <me@iamphill.com>2017-05-04 15:54:16 +0100
commit79f40f27fd64b9209e1faa528e658d831e2c7f2f (patch)
tree5eb1c7837b5180c0071ec75e238c27fe917023ee /config
parent5c91113c5b6edc4fa1d63bc161b791c7e84e644d (diff)
parent985737fdcf9b79dadfb72d0c9ed9abf4464559f8 (diff)
downloadgitlab-ce-79f40f27fd64b9209e1faa528e658d831e2c7f2f.tar.gz
Merge branch 'master' into deploy-keys-load-async
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb1
-rw-r--r--config/routes/uploads.rb11
2 files changed, 12 insertions, 0 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index a15e365cc2f..956afe4faa3 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -234,6 +234,7 @@ constraints(ProjectUrlConstrainer.new) do
get :related_branches
get :can_create_branch
get :rendered_title
+ post :create_merge_request
end
collection do
post :bulk_update
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index 2b22148a134..b315186b178 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -4,6 +4,11 @@ scope path: :uploads do
to: "uploads#show",
constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /[^\/]+/ }
+ # show uploads for models, snippets (notes) available for now
+ get ':model/:id/:secret/:filename',
+ to: 'uploads#show',
+ constraints: { model: /personal_snippet/, id: /\d+/, filename: /[^\/]+/ }
+
# Appearance
get ":model/:mounted_as/:id/:filename",
to: "uploads#show",
@@ -13,6 +18,12 @@ scope path: :uploads do
get ":namespace_id/:project_id/:secret/:filename",
to: "projects/uploads#show",
constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: /[^\/]+/ }
+
+ # create uploads for models, snippets (notes) available for now
+ post ':model/:id/',
+ to: 'uploads#create',
+ constraints: { model: /personal_snippet/, id: /\d+/ },
+ as: 'upload'
end
# Redirect old note attachments path to new uploads path.