Some Sequelize commands don't return anything (or at least not anything useful) by default. Sequelize uses an option called returning
to specify which data returns from a commands like .destroy()
or update()
.
Let's look at three common Sequelize commands and see how to handle the data returned by each.
By default, .create()
returns the newly created instance. This is convenient, because we can then send data to the user: