Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.on('log', function (x) { if (x.msg === 'Starting flows') {
RED.settings.functionGlobalContext.updated = false;
// logger.removeAllListeners();
nodeAPI.putResource(device).catch(RED.log.error);
nodeAPI.putResource(pipelines).then(function () {
RED.log.info('Devices and self registred with ledger.');
RED.nodes.updateFlow('global', {
configs: [ {
id: deviceNodeID,
type: 'device',
nmos_id: device.id,
version: device.version,
nmos_label: device.label,
nmos_type: device.type,
node_id: device.node_id,
node_ref: selfNodeID
}, {
function () {
RED.settings.functionGlobalContext.updated = true;
RED.log.info('Dynamorse tab checked and created if required.')
},
RED.log.error