File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/main/java/in/erail/amazon/lambda Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,7 @@ public JsonObject handleMessage(JsonObject pJsonObject) {
75
75
76
76
public JsonObject transform (JsonObject pMsg ) {
77
77
78
- if (!pMsg .containsKey (IS_BASE64_ENCODED )) {
79
- pMsg .put (IS_BASE64_ENCODED , Boolean .FALSE );
80
- }
78
+ pMsg .put (IS_BASE64_ENCODED , Boolean .TRUE );
81
79
82
80
if (!pMsg .containsKey (STATUS_CODE )) {
83
81
pMsg .put (STATUS_CODE , "200" );
@@ -87,11 +85,10 @@ public JsonObject transform(JsonObject pMsg) {
87
85
pMsg .put (HEADERS , new JsonObject ());
88
86
}
89
87
90
- if (! pMsg .containsKey (BODY )) {
91
- pMsg .put (BODY , new JsonObject (). toString ( ));
88
+ if (pMsg .containsKey (BODY )) {
89
+ pMsg .put (BODY , pMsg . getString ( BODY ));
92
90
} else {
93
- String body = pMsg .getValue (BODY ).toString ();
94
- pMsg .put (BODY , body );
91
+ pMsg .put (BODY , "" );
95
92
}
96
93
97
94
return pMsg ;
You can’t perform that action at this time.
0 commit comments