lib/magellan/cli/resources/authority.rb in magellan-cli-0.10.0 vs lib/magellan/cli/resources/authority.rb in magellan-cli-0.11.0
- old
+ new
@@ -27,11 +27,11 @@
desc "update ATTRIBUTES", I18n.t(:update, scope: [:resources, :common, :cmd], resource_name: resource_name)
def update(attrs)
s = load_selection!(self.class)
attrs = JSON.parse(File.readable?(attrs) ? File.read(attrs) : attrs)
- put_json("/admin/#{resource_key}/#{s['id']}/edit.json", {"magellan_auth_authority" => attrs})
+ put_json("/admin/#{resource_key}/#{s['id']}/edit.js", {"magellan_auth_authority" => attrs})
end
desc "create PROJECT_ROLE STAGE_ROLE STAGE_TYPE", I18n.t(:create, scope: [:resources, :authority, :cmd], resource_name: resource_name)
def create(project_role, stage_role, stage_type)
team = load_selection!(Team)
@@ -59,10 +59,10 @@
"project_role" => project_role,
"stage_role" => stage_role,
"stage_type" => stage_type_map[stage_type],
}
}
- ret = post_json("/admin/#{resource_key}/new.json", params)
+ ret = post_json("/admin/#{resource_key}/new.js", params)
if ret and ret["id"]
select ret["id"]
end
end