dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

Switch to LoDash.defaults in create and update-controller #163

Closed H256 closed 8 years ago

H256 commented 8 years ago

Use _.defaults instead of _.extend inside Update.write and Create.write to enable modifying attributes in the .write.before - hook.

This should solve #117 ...

Any possible side-effects?

mbroadst commented 8 years ago

Well it doesn't break any tests :)

Would you be willing to add a test proving that this solves your particular use-case, so we have something we can discuss in the possible situation that this broke someone else's behavior?

H256 commented 8 years ago

Added test for my use-case.

mbroadst commented 8 years ago

LGTM, thanks for the contribution!