From 250172128fe5a76463cd3936b28e68905c43a75c Mon Sep 17 00:00:00 2001 From: diazjj <jjdiaz@cttc.es> Date: Fri, 26 Jul 2024 12:20:04 +0200 Subject: [PATCH] Updated the way the dlt_gateway handles chaincode responses --- src/dlt/gateway/dltApp/src/dltGateway.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dlt/gateway/dltApp/src/dltGateway.js b/src/dlt/gateway/dltApp/src/dltGateway.js index c2cfb5e45..f4f9c0d0a 100644 --- a/src/dlt/gateway/dltApp/src/dltGateway.js +++ b/src/dlt/gateway/dltApp/src/dltGateway.js @@ -100,7 +100,7 @@ async function getFromDlt(call, callback) { const result = JSON.parse(resultJson); // Send the response with the formatted JSON data - callback(null, { record_id: call.request, data_json: JSON.stringify(result) }); + callback(null, { record_id: call.request, operation: result.operation, data_json: result.data_json }); } catch (error) { if (error.message.includes("data not found for key")) { // Return an empty response when no record is found -- GitLab