devinivy / bedwetter

Auto-generated, RESTful, CRUDdy route handlers for Waterline models in hapi
64 stars 11 forks source link

Added deletedFlag ability to destroy function to set a flag rather than destroying #9

Closed ThrivingKings closed 9 years ago

ThrivingKings commented 9 years ago

Allows DELETE requests to also set a deleted flag on the model rather than removing the object.

devinivy commented 9 years ago

Mind writing tests for this? test/options/deletedFlag.js would be a fine place for it. Also wondering if find/findOne should be adjusted to respect the soft delete. Here's a related issue in waterline for soft deletes, which could affect how this feature works in the future: https://github.com/balderdashy/waterline/issues/134

devinivy commented 9 years ago

In the meantime, I'd say it's fine to move forward assuming that this will be a feature in bedwetter. I've wanted to implement soft deletes.

devinivy commented 9 years ago

@ThrivingKings merged. Thanks! Do see #10 if you have any time.