Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function loadConfigurationFromAppserver (appServer, callback) {
if (!appServer.getIotaConfiguration()) {
return iotAgentLib.getConfiguration(appServer.getAppId(), '', callback);
} else {
var conf = appServer.getIotaConfiguration();
if (!conf.resource) {
return callback(null, conf);
} else {
return iotAgentLib.getConfiguration(appServer.getAppId(), '', callback);
}
}
}