Closed alzeih closed 4 years ago
@alzeih If you wish to have this shipped in the upcoming release, please find time to make the requested changes a.s.a.p. Thank you.
- Needs a bit of a refactoring..
Done.
- Are resources at the
/data/
namespace immune to the issue faced by other types?
No, they are not, but the front end requests for data are inconsistent with those of collections, drafts, and pages, as it doesn't send the path. I can see how to fix it, but it's a separate PR.
@alzeih I'm on board with the current approach. However, I think the intent would be better expressed if the methods were named along the lines of :ensure_not_existing_file
instead.
If you can add more tests, the better.
For collections, drafts and pages, return a 404 if a new or renamed item will overwrite an existing item.
Fixes #489 .
Let me know if this looks like the right approach.
Two existing tests were altered to match what I was seeing during manual testing. New tests not written yet, I'll wait until I get some feedback on the changes.