fix: save config used on migration

This commit is contained in:
José Oliveira 2022-01-21 00:28:04 +00:00
parent c072803ac3
commit bd2d2b06c2
12 changed files with 31 additions and 19 deletions

View file

@ -1,4 +1,4 @@
const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
const { migrationSaveConfig, loadLatest } = require('../lib/new-settings-loader')
exports.up = function (next) {
const newConfig = {
@ -6,7 +6,7 @@ exports.up = function (next) {
}
return loadLatest()
.then(config => {
return saveConfig(newConfig)
return migrationSaveConfig(newConfig)
.then(() => next())
.catch(err => {
if (err.message === 'lamassu-server is not configured') {