lyquocnam / fastify-sequelize

Fastity plugin work with Sequelize (adapter for NodeJS -> Sqlite, Mysql, Mssql, Posgres)
23 stars 12 forks source link

plugins can return a promise #4

Closed mcollina closed 6 years ago

mcollina commented 6 years ago

as sequelize is promise-based, you can return a promise instead of calling next.

Currently you are not handling the error correctly, as catch() is just console.logging.