Skip to content

Commit

Permalink
[api] Refactor Backend::Api::Published
Browse files Browse the repository at this point in the history
...to use Backend::Api::Connection calls
  • Loading branch information
Moises Deniz Aleman committed Sep 29, 2017
1 parent 200a08f commit 7f5f33e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/lib/backend/api/published.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
module Backend
module Api
class Published
extend Backend::ConnectionHelper

# Returns the download url for a repository
def self.download_url_for_repository(project, repository)
Backend::Connection.get("/published/#{CGI.escape(project)}/#{CGI.escape(repository)}?view=publishedpath").body
get(['/published/:project/:repository', project, repository], params: { view: :publishedpath })
end
end
end
Expand Down

0 comments on commit 7f5f33e

Please sign in to comment.