gitlab-org--gitlab-foss/config/routes/wiki.rb
Stan Hu 6811adafd5 Relax constraint on Wiki IDs, since subdirectories can contain spaces
If a subdirectory contains spaces, GitLab would be unable to generate
the route in the sidebar, resulting in an Error 500.

Closes #30357
2017-04-02 06:36:37 -07:00

17 lines
426 B
Ruby

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
scope(path: 'wikis/*id', as: :wiki, format: false) do
get :edit
get :history
post :preview_markdown
get '/', action: :show
put '/', action: :update
delete '/', action: :destroy
end
end