Skip to content

Commit

Permalink
Refactor patchinfo routes to resource :patchinfo
Browse files Browse the repository at this point in the history
Adapt the patchinfo new_tracker helper path
  • Loading branch information
vpereira committed Oct 1, 2019
1 parent 9fec378 commit 1d5c2a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/app/views/webui/patchinfo/form/_issues.html.haml
Expand Up @@ -7,7 +7,7 @@
target: '_blank', rel: 'noopener') do
List of supported trackers.
= text_field_tag(:issue_ids, '', class: 'form-control w-auto d-inline-block')
= link_to(patchinfo_new_tracker_url, id: 'add-issues', title: 'Add Issues', remote: true, data: { dataType: 'json', project: project.name }) do
= link_to(new_tracker_patchinfo_url, id: 'add-issues', title: 'Add Issues', remote: true, data: { dataType: 'json', project: project.name }) do
%i.fas.fa-plus-circle.text-primary
%i.fas.fa-spinner.fa-spin.d-none
Add issues
Expand Down
10 changes: 5 additions & 5 deletions src/api/config/routes/webui_routes.rb
Expand Up @@ -115,14 +115,14 @@
end
end

resource :patchinfo, except: [:show, :update], controller: 'webui/patchinfo' do
get 'new_tracker' => :new_tracker
post 'update_issues/:project/:package' => :update_issues, as: :update_issues
end

controller 'webui/patchinfo' do
post 'patchinfo' => :create
get 'patchinfo/edit' => :edit, as: 'edit_patchinfo'
put 'patchinfo/:project/:package' => :update, constraints: cons, as: 'update_patchinfo'
delete 'patchinfo' => :destroy
post 'patchinfo/update_issues/:project/:package' => :update_issues, as: 'update_issues_patchinfo'
get 'patchinfo/show/:project/:package' => :show, as: 'patchinfo_show', constraints: cons, defaults: { format: 'html' }
get 'patchinfo/new_tracker' => :new_tracker
end

controller 'webui/repositories' do
Expand Down

0 comments on commit 1d5c2a4

Please sign in to comment.