Skip to content

Commit

Permalink
refactor(config): fix identation in config/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
prlanzarin committed Nov 16, 2022
1 parent 8def3c4 commit 7e82ace
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ const DEFAULT_SETTINGS_FILE_PATH = './settings.json';
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-pads.json';

const localSettingsExists = () => {
try {
fs.accessSync(LOCAL_SETTINGS_FILE_PATH);
} catch (err) {
return false;
}
return true;
try {
fs.accessSync(LOCAL_SETTINGS_FILE_PATH);
} catch (err) {
return false;
}
return true;
};

const SETTINGS = require(DEFAULT_SETTINGS_FILE_PATH);

if (localSettingsExists()) {
const LOCAL_SETTINGS = require(LOCAL_SETTINGS_FILE_PATH);
_.mergeWith(SETTINGS, LOCAL_SETTINGS, (a, b) => (_.isArray(b) ? b : undefined));
const LOCAL_SETTINGS = require(LOCAL_SETTINGS_FILE_PATH);
_.mergeWith(SETTINGS, LOCAL_SETTINGS, (a, b) => (_.isArray(b) ? b : undefined));
}

const config = SETTINGS;

module.exports = config;

0 comments on commit 7e82ace

Please sign in to comment.