Skip to content

Instantly share code, notes, and snippets.

@easierbycode
Created June 25, 2015 21:10
Show Gist options
  • Save easierbycode/7941889b10407300ddae to your computer and use it in GitHub Desktop.
Save easierbycode/7941889b10407300ddae to your computer and use it in GitHub Desktop.
fields = switch req.query.msgType
when '0' then ['timestamp', 'macAddress', 'gatewayBattery', 'rssi']
when '2' then ['timestamp', 'macAddress', 'gatewayBattery', 'gatewayEventCode', 'rssi']
when '4' then ['timestamp', 'macAddress', 'sensorEventStart', 'sensorEventEnd', 'rssi', 'sensorHubBattery', 'sensorHubMacAddress', 'sensorHubRssi']
when '5' then ['timestamp', 'macAddress', 'rssi', 'numberOfSensors', 'sensorHubBattery', 'sensorHubData1', 'sensorHubData2', 'sensorHubData3', 'sensorHubMacAddress', 'sensorHubRssi', 'sensorHubType']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment