Skip to content

Commit

Permalink
Merge pull request #20 from bigbluebutton/develop
Browse files Browse the repository at this point in the history
chore: update from develop (1.4.0)
  • Loading branch information
prlanzarin authored Nov 16, 2022
2 parents 699b7a1 + 0b96062 commit 61f89b6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
24 changes: 22 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
const settings = require('./settings');
const fs = require('node:fs');
const _ = require('lodash');

const config = settings;
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;
};

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 config = SETTINGS;

module.exports = config;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbb-pads",
"version": "1.3.2",
"version": "1.4.0",
"description": "BigBlueButton's pads manager",
"engines": {
"node": ">=16"
Expand Down

0 comments on commit 61f89b6

Please sign in to comment.