digidem / osm-p2p-server

Peer-to-peer OpenStreetMap API v0.6 Server for osm-p2p-db
BSD 2-Clause "Simplified" License
87 stars 10 forks source link

handle `if-unused` in changeset upload delete block #17

Closed gmaclennan closed 8 years ago

gmaclennan commented 8 years ago

The "if-unused" attribute in the delete block of a changeset upload should be checked for and handled. iD editor uses this key.

http://wiki.openstreetmap.org/wiki/API_v0.6#Diff_upload:_POST_.2Fapi.2F0.6.2Fchangeset.2F.23id.2Fupload

gmaclennan commented 8 years ago

it looks like iD always sets this attribute, but we should definitely always check if any deleted nodes/ways are used in other entities before deleting.

ghost commented 8 years ago

Implemented in 1.11.0 with tests.

ghost commented 8 years ago

also need to implement precondition failures (412) for DELETE requests, not just changeset uploads