Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (newVessel.beam) {
set('design.beam.value', Number(newVessel.beam))
}
if (newVessel.height) {
set('design.airHeight.value', Number(newVessel.height))
}
if (newVessel.gpsFromBow) {
set('sensors.gps.fromBow.value', Number(newVessel.gpsFromBow))
}
if (newVessel.gpsFromCenter) {
set('sensors.gps.fromCenter.value', Number(newVessel.gpsFromCenter))
}
if (newVessel.aisShipType) {
set('design.aisShipType.value', {
name: getAISShipTypeName(newVessel.aisShipType),
id: Number(newVessel.aisShipType)
})
}
skConfig.writeDefaultsFile(app, data, err => {
if (err) {
res.status(500).send('Unable to save to defaults file')
} else {
res.send('Vessel changed')
}
})
})