lamassu-server/packages/server/migrations/1732881659436-rates-screen.js
2025-12-31 19:04:13 +01:00

20 lines
466 B
JavaScript

const _ = require('lodash/fp')
const { loadConfig, saveConfig } = require('./settings')
exports.up = function (next) {
const newConfig = {}
return loadConfig()
.then(config => {
if (!_.isNil(config.machineScreens_rates_active)) return
newConfig[`machineScreens_rates_active`] = true
return saveConfig(newConfig)
})
.then(next)
.catch(err => {
return next(err)
})
}
module.exports.down = function (next) {
next()
}