Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@rmccue
Copy link
Member

@rmccue rmccue commented Mar 1, 2015

Practically speaking: a DELETE request to a post resource will ensure the post is trashed. If the post is already trashed, no change will occur. To permanently delete, pass force=true, and it will be permanently deleted regardless of status.

This is a change from the previous behaviour of the first DELETE trashing the post, and the second DELETE permanently deleting it.

See #789.

rmccue added 2 commits March 1, 2015 19:04
Practically speaking: a DELETE request to a post resource will ensure
the post is trashed. If the post is already trashed, no change will
occur. To permanently delete, pass force=true, and it will be
permanently deleted regardless of status.

This is a change from the previous behaviour of the first DELETE
trashing the post, and the second DELETE permanently deleting it.
@rmccue
Copy link
Member Author

rmccue commented Mar 1, 2015

The second commit here also returns a 410 Gone if you call DELETE when it's already trashed. Anyone have opinions on this? 410 might be a bit too permanent, so maybe a 400 or 404 is a better code here.

(Also, still needs testing.)

@rmccue rmccue added this to the 2.0 milestone Mar 1, 2015
@rmccue rmccue added the Bug label Mar 1, 2015
@rmccue rmccue modified the milestones: 2.0 Beta 1, 2.0 Mar 30, 2015
@rmccue
Copy link
Member Author

rmccue commented Apr 21, 2015

As reflected by the low line-count change, this is a pretty simple fix for the bug. This isn't the full solution to #789, as it's clear we need more than this in any case, but the bug needs to be fixed before we can ship beta 1.

rachelbaker added a commit that referenced this pull request Apr 22, 2015
Ensure post deletion is idempotent
@rachelbaker rachelbaker merged commit eab8675 into develop Apr 22, 2015
@rachelbaker rachelbaker deleted the trashing-sanity branch April 22, 2015 12:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants