tommybananas / finale

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

Allow options to be passed to all Controllers #64

Open danieldilly opened 4 years ago

danieldilly commented 4 years ago

Enables the passing of options to the static sequelize methods create(), save(), and destroy() used in the Controller files create.js, update.js, and delete.js, respectively.

I am submitting this update because I need this functionality in order to enable user tracking in the sequelize-paper-trail library. I need to be able to pass a userId property through the options object that gets passed to the methods I mentioned earlier.

The passing of the options object was already set up for the other Controller files: read.js & list.js. This enables the same functionality for the other Controllers.