From c6a91f1980649d63b1ad51ce805b39edd7c9e28f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Jan 2024 16:39:30 +0100 Subject: [PATCH] Modifs RestResponse 0901241639 --- RFXtoRP_RestResponse.ftl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index eb4cdd4..2b62793 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -43,7 +43,11 @@ <#default> [ { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "{}" /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : @@ -57,7 +61,7 @@ <#switch restResponsetMsg.status> <#case 200> <#case 201> - <#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> + <#-- *********************************************** ApiRestID = receipts_post ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > @@ -85,7 +89,11 @@ <#default> [ { - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "{}" /> + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" :