Skip to content

Commit

Permalink
Remove unnecessary backend call from Package#show
Browse files Browse the repository at this point in the history
We already have the file list requested, we don't need to ask the backend again
about the _service file. This removes ~100ms from the request time.
  • Loading branch information
ChrisBr committed Dec 12, 2018
1 parent 410c581 commit 09fa6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def show

@comments = @package.comments.includes(:user)
@comment = Comment.new
@services = Backend::Api::Sources::Package.service(@project.name, @package.name)
@services = @files.any? { |file| file[:name] == '_service' }

switch_to_webui2
end
Expand Down

0 comments on commit 09fa6b5

Please sign in to comment.