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,10 +7,10 @@ exports.up = function (next) {
return loadLatest()
.then(config => {
return saveConfig(newConfig)
.then(next)
.catch(err => {
return next(err)
})
})
.then(next)
.catch(err => {
return next(err)
})
}