refactor: use loadLatestConfig() in place of loadLatest() where applicable

This commit is contained in:
siiky 2024-09-17 15:38:35 +01:00
parent 5342e9a8be
commit cac88fda45
15 changed files with 52 additions and 56 deletions

View file

@ -1,11 +1,10 @@
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 (config.config.locale_timezone === "0:0") {
newConfig[`locale_timezone`] = 'GMT'
if (config.locale_timezone === "0:0") {
const newConfig = { locale_timezone: 'GMT' }
return saveConfig(newConfig)
}
})