2017-02-21 18:32:18 -05:00
|
|
|
WIKI_SLUG_ID = { id: /\S+/ }.freeze unless defined? WIKI_SLUG_ID
|
2016-11-07 10:14:34 -05:00
|
|
|
|
2016-11-14 09:55:31 -05:00
|
|
|
scope(controller: :wikis) do
|
|
|
|
scope(path: 'wikis', as: :wikis) do
|
|
|
|
get :git_access
|
|
|
|
get :pages
|
|
|
|
get '/', to: redirect('/%{namespace_id}/%{project_id}/wikis/home')
|
|
|
|
post '/', to: 'wikis#create'
|
|
|
|
end
|
2016-11-07 10:14:34 -05:00
|
|
|
|
2016-11-14 09:55:31 -05:00
|
|
|
scope(path: 'wikis/*id', as: :wiki, constraints: WIKI_SLUG_ID, format: false) do
|
|
|
|
get :edit
|
|
|
|
get :history
|
|
|
|
post :preview_markdown
|
|
|
|
get '/', action: :show
|
|
|
|
put '/', action: :update
|
|
|
|
delete '/', action: :destroy
|
|
|
|
end
|
2016-11-07 10:14:34 -05:00
|
|
|
end
|