diff --git a/index.js b/index.js index 0d175ed..a9b9c4f 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ exports.register = function (plugin, options, next) { sequelize .authenticate() - .complete(function(err) { + .then(function(err) { if (!!err) { plugin.log(['hapi-sequelize', 'error'], 'Error connecting to database. ' + err); return next(err);