update the service config in addons code

This commit is contained in:
Girish Ramakrishnan
2021-01-20 11:10:17 -08:00
parent 10d7c47576
commit 7b24239d38
2 changed files with 5 additions and 6 deletions
+3 -6
View File
@@ -117,10 +117,7 @@ exports = module.exports = {
_setApiServerOrigin: setApiServerOrigin
};
const NOOP_CALLBACK = function (error) { if (error) debug(error); };
var addons = require('./addons.js'),
assert = require('assert'),
const assert = require('assert'),
backups = require('./backups.js'),
BoxError = require('./boxerror.js'),
constants = require('./constants.js'),
@@ -454,9 +451,9 @@ function setPlatformConfig(platformConfig, callback) {
settingsdb.set(exports.PLATFORM_CONFIG_KEY, JSON.stringify(platformConfig), function (error) {
if (error) return callback(error);
callback(null); // updating service config can take a while
notifyChange(exports.PLATFORM_CONFIG_KEY, platformConfig);
addons.updateServiceConfig(platformConfig, NOOP_CALLBACK);
callback(null);
});
}