lib/atlas_rb/community.rb in atlas_rb-0.0.54 vs lib/atlas_rb/community.rb in atlas_rb-0.0.56
- old
+ new
@@ -8,10 +8,10 @@
JSON.parse(connection({}).get(ROUTE + id)&.body)["community"]
end
def self.create(id = nil, xml_path = nil)
result = JSON.parse(connection({ parent_id: id }).post(ROUTE)&.body)["community"]
- return unless xml_path.present?
+ return result unless xml_path.present?
update(result["id"], xml_path)
find(result["id"])
end