Sha256: 4576bcc97b1dc1113a8f2c36a4ff3dde32253dcf41360dff5e7be95723857c30
Contents?: true
Size: 1.08 KB
Versions: 7
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true Rails.application.routes.draw do namespace :api, :defaults => { :format => 'json' } do scope '(:apiv)', :module => :v2, :defaults => { :apiv => 'v2' }, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do constraints(:host_id => /[^\/]+/) do resources :hosts, :only => [] do constraints(:id => /[^\/]+/) do resources :snapshots, except: [:new, :edit] do member do put :revert end end end end end end end constraints(host_id: %r{[^\/]+}) do resources :hosts, only: [] do resources :snapshots, module: 'foreman_snapshot_management', only: [:index, :create, :destroy, :update] do member do put :revert end end end end resources :snapshots, module: 'foreman_snapshot_management', only: [] do collection do post :select_multiple_host post :create_multiple_host end end end
Version data entries
7 entries across 7 versions & 1 rubygems