From 65f5d3f6ebed1228a4ece1405354a0c112ce6a04 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 10 Jan 2025 13:06:03 +0100 Subject: [PATCH] add lastMeasure to device api --- lib/services/northBound/deviceProvisioningServer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/services/northBound/deviceProvisioningServer.js b/lib/services/northBound/deviceProvisioningServer.js index d9ee1668e..bc5d468a6 100644 --- a/lib/services/northBound/deviceProvisioningServer.js +++ b/lib/services/northBound/deviceProvisioningServer.js @@ -65,7 +65,8 @@ const provisioningAPITranslation = { ngsiVersion: 'ngsiVersion', entityNameExp: 'entityNameExp', payloadType: 'payloadType', - storeLastMeasure: 'storeLastMeasure' + storeLastMeasure: 'storeLastMeasure', + lastMeasure: 'lastMeasure' }; /** @@ -145,7 +146,8 @@ function handleProvision(req, res, next) { explicitAttrs: body.explicitAttrs, ngsiVersion: body.ngsiVersion, payloadType: body.payloadType, - storeLastMeasure: body.storeLastMeasure + storeLastMeasure: body.storeLastMeasure, + lastMeasure: body.lastMeasure }); } @@ -223,7 +225,8 @@ function toProvisioningAPIFormat(device) { explicitAttrs: device.explicitAttrs, ngsiVersion: device.ngsiVersion, payloadType: device.payloadType, - storeLastMeasure: device.storeLastMeasure + storeLastMeasure: device.storeLastMeasure, + lastMeasure: device.lastMeasure }; }