Skip to content
Browse files

#1 Fix `lingohub translation:down --all ARGS`

Previously, "members" was nested below "resources"
and "links" used to be "link" and no array.
  • Loading branch information...
1 parent db4ec8c commit 4ff6270272f441b7c3fa2a053a25fb4930c3f22e @snusnu snusnu committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/lingohub/models/project.rb
View
4 lib/lingohub/models/project.rb
@@ -46,9 +46,9 @@ def resources
@resources = {}
response = @client.get(self.resources_url)
resource_hash = JSON.parse(response)
- members = resource_hash["resources"]["members"]
+ members = resource_hash["members"]
members.each do |member|
- @resources[member["name"]] = Lingohub::Models::Resource.new(@client, member["link"]["href"])
+ @resources[member["name"]] = Lingohub::Models::Resource.new(@client, member["links"][0]["href"])
end
end
@resources

0 comments on commit 4ff6270

Please sign in to comment.
Something went wrong with that request. Please try again.