- Replaced SQL statements with a configuration object for LNBits settings, enhancing code clarity and maintainability. - Simplified the migration process by utilizing the saveConfig function for applying configurations. - Marked the down migration as a no-op to prevent breaking existing configurations.
17 lines
No EOL
412 B
JavaScript
17 lines
No EOL
412 B
JavaScript
const { saveConfig } = require('../lib/new-settings-loader')
|
|
|
|
exports.up = function (next) {
|
|
const config = {
|
|
'lnbits_endpoint': '',
|
|
'lnbits_adminKey': '',
|
|
'LN_wallet': 'lnbits'
|
|
}
|
|
|
|
saveConfig(config).then(next).catch(next)
|
|
}
|
|
|
|
exports.down = function (next) {
|
|
// No-op - removing config entries is not typically done in down migrations
|
|
// as it could break existing configurations
|
|
next()
|
|
} |