Skip to content

Commit

Permalink
Merge pull request #10338 from hennevogel/bugfix/slash-about-malarky
Browse files Browse the repository at this point in the history
Remove / to about routing malarky
  • Loading branch information
vpereira committed Oct 23, 2020
2 parents f3629c7 + 89b524b commit e2d0487
Show file tree
Hide file tree
Showing 74 changed files with 2,271 additions and 7,201 deletions.
12 changes: 0 additions & 12 deletions src/api/app/controllers/main_controller.rb

This file was deleted.

4 changes: 0 additions & 4 deletions src/api/app/controllers/public_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ class PublicController < ApplicationController
skip_before_action :extract_user
skip_before_action :require_login

def index
redirect_to controller: 'about', action: 'index'
end

# GET /public/build/:project/:repository/:arch/:package
def build
required_parameters :project
Expand Down
10 changes: 4 additions & 6 deletions src/api/config/routes/api_routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
cons = RoutesHelper::RoutesConstraints::CONS

constraints(RoutesHelper::APIMatcher) do
get '/' => 'main#index'
get '/', to: redirect('/about')

resources :about, only: :index

resource :configuration, only: [:show, :update, :schedulers]

Expand Down Expand Up @@ -42,8 +44,6 @@
### /source
get 'source/:project/_keyinfo' => 'source/key_info#show', constraints: cons

resources :about, only: :index

controller :attribute_namespace do
get 'attribute' => :index
get 'attribute/:namespace' => :index
Expand Down Expand Up @@ -196,7 +196,7 @@

### /public
controller :public do
get 'public' => :index
get 'public', to: redirect('/public/about')
get 'public/about' => 'about#index'
get 'public/configuration' => :configuration_show
get 'public/configuration.xml' => :configuration_show
Expand All @@ -213,8 +213,6 @@
get 'public/build/:project(/:repository(/:arch(/:package(/:filename))))' => 'public#build', constraints: cons, as: :public_build
end

get '/404' => 'main#notfound'

scope 'public' do
resources :image_templates, constraints: cons, only: [:index], controller: 'webui/image_templates'
end
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2d0487

Please sign in to comment.