summaryrefslogtreecommitdiff
path: root/config/routes/jira_connect.rb
blob: f45f524935a6cfa84bdc53451f78a1a07b800704 (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
25
26
27
# frozen_string_literal: true

namespace :jira_connect do
  # This is so we can have a named route helper for the base URL
  root to: proc { [404, {}, ['']] }, as: 'base'

  get 'app_descriptor' => 'app_descriptor#show'
  get :users, to: 'users#show'

  namespace :events do
    post 'installed'
    post 'uninstalled'
  end

  resources :subscriptions, only: [:index, :create, :destroy]
  resources :branches, only: [:new]
  resources :public_keys, only: :show

  resources :installations, only: [:index] do
    collection do
      put :update
    end
  end

  resources :oauth_callbacks, only: [:index]
  resource :oauth_application_id, only: [:show]
end