diff --git a/lib/new-settings-loader.js b/lib/new-settings-loader.js index 018fa625..4c26db2f 100644 --- a/lib/new-settings-loader.js +++ b/lib/new-settings-loader.js @@ -54,17 +54,8 @@ function loadAccounts (schemaVersion) { } function showAccounts (schemaVersion) { - const sql = `select data - from user_config - where type=$1 - and schema_version=$2 - and valid - order by id desc - limit 1` - - return db.oneOrNone(sql, ['accounts', schemaVersion || NEW_SETTINGS_LOADER_SCHEMA_VERSION]) - .then(res => { - const accounts = _.compose(_.defaultTo({}), _.get('data.accounts'))(res) + return loadAccounts(schemaVersion) + .then(accounts => { const filledSecretPaths = _.compact(_.map(path => { if (!_.isEmpty(_.get(path, accounts))) { return path