Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 06:06:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 06:06:01 +0300
commit8c7eab92cd0009f55cb999bbade43e0f969c137e (patch)
tree180cac6632448a211ddbe555191574c98e8dc385 /config
parentdffeff5520e861dc6e7319b690c573186bbbd22e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb2
-rw-r--r--config/routes/wiki.rb20
2 files changed, 17 insertions, 5 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 056289a72db..3dd34083c44 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -615,7 +615,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
# Since both wiki and repository routing contains wildcard characters
- # its preferable to keep it below all other project routes
+ # its preferable to keep them below all other project routes
draw :wiki
draw :repository
diff --git a/config/routes/wiki.rb b/config/routes/wiki.rb
index d439c99270e..3e71c5eb924 100644
--- a/config/routes/wiki.rb
+++ b/config/routes/wiki.rb
@@ -1,13 +1,21 @@
scope(controller: :wikis) do
+ scope(path: 'wikis/pages', as: :wiki_pages, format: false) do
+ get :new, to: 'wiki_pages#new'
+ post '/', to: 'wiki_pages#create'
+ end
+
scope(path: 'wikis', as: :wikis) do
get :git_access
get :pages
- get :new
- get '/', to: redirect('%{namespace_id}/%{project_id}/wikis/home')
- post '/', to: 'wikis#create'
+ get '/', to: redirect('%{namespace_id}/%{project_id}/-/wiki_pages/home')
+ get '/*id', to: redirect('%{namespace_id}/%{project_id}/-/wiki_pages/%{id}')
+ end
+
+ scope(path: '-/wiki_pages', as: :wiki_page, format: false) do
+ post '/', to: 'wiki_pages#create'
end
- scope(path: 'wikis/*id', as: :wiki, format: false) do
+ scope(path: '-/wiki_pages/*id', as: :wiki, format: false, controller: :wiki_pages) do
get :edit
get :history
post :preview_markdown
@@ -15,4 +23,8 @@ scope(controller: :wikis) do
put '/', action: :update
delete '/', action: :destroy
end
+
+ scope(path: '-/wiki_dirs/*id', as: :wiki_dir, format: false, controller: :wiki_directories) do
+ get '/', action: :show
+ end
end