refactor: improve promise handling

This commit is contained in:
José Oliveira 2021-05-26 15:52:03 +01:00
parent 6c253ec4cf
commit d6771840bd

View file

@ -7,11 +7,11 @@ exports.up = function (next) {
return loadLatest() return loadLatest()
.then(config => { .then(config => {
return saveConfig(newConfig) return saveConfig(newConfig)
})
.then(next) .then(next)
.catch(err => { .catch(err => {
return next(err) return next(err)
}) })
})
} }
module.exports.down = function (next) { module.exports.down = function (next) {