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

wiki.rb « routes « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dad746d59a15fb145958e5ffb016beaa30709e98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
WIKI_SLUG_ID = { id: /\S+/ } unless defined? WIKI_SLUG_ID

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, constraints: WIKI_SLUG_ID, format: false) do
    get :edit
    get :history
    post :preview_markdown
    get '/', action: :show
    put '/', action: :update
    delete '/', action: :destroy
  end
end