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:
authorTimothy Andrew <mail@timothyandrew.net>2016-06-08 08:02:50 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-06-09 07:45:01 +0300
commite6b1d1669b362ad4cea27ac44e89e73f4d6e92fd (patch)
treec95b552cb18d42067161429cc738a40a3794b467 /config
parent8e71c19a6940b8d82c70ee9b2550b62b5169eb54 (diff)
Hook up the updated `WikiLinkFilter` to the wiki controllers.
- Need to pass in a `page_slug` to the filter, so it can rewrite based on the current page (all links are rewritten to the level of the app root). - The earlier `markdown_preview` endpoint was at the level of the wiki. We need to know the current page (for rewriting, as above), so this commit moves the endpoint to the level of a wiki page. - Fix all tests
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 428302d0fd7..34126bbe913 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -591,7 +591,6 @@ Rails.application.routes.draw do
# Order matters to give priority to these matches
get '/wikis/git_access', to: 'wikis#git_access'
get '/wikis/pages', to: 'wikis#pages', as: 'wiki_pages'
- post '/wikis/markdown_preview', to:'wikis#markdown_preview'
post '/wikis', to: 'wikis#create'
get '/wikis/*id/history', to: 'wikis#history', as: 'wiki_history', constraints: WIKI_SLUG_ID
@@ -600,6 +599,7 @@ Rails.application.routes.draw do
get '/wikis/*id', to: 'wikis#show', as: 'wiki', constraints: WIKI_SLUG_ID
delete '/wikis/*id', to: 'wikis#destroy', constraints: WIKI_SLUG_ID
put '/wikis/*id', to: 'wikis#update', constraints: WIKI_SLUG_ID
+ post '/wikis/*id/markdown_preview', to:'wikis#markdown_preview', constraints: WIKI_SLUG_ID, as: 'wiki_markdown_preview'
end
resource :repository, only: [:show, :create] do