summaryrefslogtreecommitdiff
path: root/config/routes/wiki.rb
blob: 4d14743b3d3d3ebc5686cfe520d0b46c657116c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

scope(controller: :wikis) do
  scope(path: 'wikis', as: :wikis) do
    get :git_access
    get :pages
    get :new
    get '/', to: redirect { |params, request| "#{request.path}/home" }
    post '/', to: 'wikis#create'
    scope '-' do
      resource :confluence, only: :show
    end
  end

  scope(path: 'wikis/*id', as: :wiki, format: false) do
    get :edit
    get :history
    get :diff
    post :preview_markdown
    get '/', action: :show
    put '/', action: :update
    delete '/', action: :destroy
  end
end