refactor: use loadLatestConfig() in place of loadLatest() where applicable
This commit is contained in:
parent
5342e9a8be
commit
cac88fda45
15 changed files with 52 additions and 56 deletions
|
|
@ -1,12 +1,11 @@
|
|||
const _ = require('lodash/fp')
|
||||
const { saveConfig, loadLatest } = require('../lib/new-settings-loader')
|
||||
const { saveConfig, loadLatestConfig } = require('../lib/new-settings-loader')
|
||||
|
||||
exports.up = function (next) {
|
||||
const newConfig = {}
|
||||
return loadLatest()
|
||||
return loadLatestConfig()
|
||||
.then(config => {
|
||||
if (!_.isNil(config.config.locale_timezone)) return
|
||||
newConfig[`locale_timezone`] = 'GMT'
|
||||
if (!_.isNil(config.locale_timezone)) return
|
||||
const newConfig = { locale_timezone: 'GMT' }
|
||||
return saveConfig(newConfig)
|
||||
})
|
||||
.then(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue