Skip to content

Commit

Permalink
correctly encode topics in url for lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Sep 13, 2023
1 parent a35fe09 commit a201f9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def update_vote_count
end

def self.import_topic(topic)
resp = Faraday.get("https://repos.ecosyste.ms/api/v1/topics/#{topic}?per_page=100&sort=created_at&order=desc")
resp = Faraday.get("https://repos.ecosyste.ms/api/v1/topics/#{ERB::Util.url_encode(topic)}?per_page=100&sort=created_at&order=desc")
if resp.status == 200
data = JSON.parse(resp.body)
urls = data['repositories'].map{|p| p['html_url'] }.uniq.reject(&:blank?)
Expand Down

0 comments on commit a201f9f

Please sign in to comment.