Merge pull request #5591 from AntonKhorev/api-element-resources--index-paths

API element resources - index paths
This commit is contained in:
Andy Allan 2025-02-05 17:13:47 +00:00 committed by GitHub
commit 7cf9bf0e55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 236 additions and 218 deletions

View file

@ -2130,7 +2130,7 @@ module Api
# add a single node to it
with_controller(NodesController.new) do
xml = "<osm><node lon='0.1' lat='0.2' changeset='#{changeset_id}'/></osm>"
put node_create_path, :params => xml, :headers => auth_header
post api_nodes_path, :params => xml, :headers => auth_header
assert_response :success, "Couldn't create node."
end
@ -2145,7 +2145,7 @@ module Api
# add another node to it
with_controller(NodesController.new) do
xml = "<osm><node lon='0.2' lat='0.1' changeset='#{changeset_id}'/></osm>"
put node_create_path, :params => xml, :headers => auth_header
post api_nodes_path, :params => xml, :headers => auth_header
assert_response :success, "Couldn't create second node."
end
@ -2515,7 +2515,7 @@ module Api
with_controller(NodesController.new) do
# create a new node
xml = "<osm><node changeset='#{cs_id}' lat='0.0' lon='0.0'/></osm>"
put node_create_path, :params => xml, :headers => auth_header
post api_nodes_path, :params => xml, :headers => auth_header
assert_response :success, "can't create a new node"
node_id = @response.body.to_i