File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import { invokeLambda } from "../services/invoke";
66
77const blessed = require ( "blessed" ) ;
88
9+ const wrapPayload = ( payload ) => JSON . stringify ( { body : payload } ) ;
10+
911const lambdaInvokeModal = (
1012 screen ,
1113 application ,
@@ -73,8 +75,9 @@ const lambdaInvokeModal = (
7375 new Box (
7476 lambdaInvokeLayout ,
7577 110 ,
76- 4 ,
77- "Arrow keys to select field | ENTER to toggle edit mode \nENTER on Submit to inject event | ESC to close"
78+ 6 ,
79+ // eslint-disable-next-line quotes
80+ 'Arrow keys to select field | ENTER to toggle edit mode \n Note: payload wrapped {"body": {...}} \nENTER on Submit to inject event | ESC to close'
7881 ) ;
7982
8083 lambdaInvokeLayout . focus ( ) ;
@@ -84,7 +87,11 @@ const lambdaInvokeModal = (
8487 lambdaInvokeLayout . key ( [ "enter" ] , ( ) => {
8588 // Inject event or select field for entry
8689 if ( currentTextbox === 2 ) {
87- invokeLambda ( awsLambdaApi , functionName , textboxes [ 1 ] . getValue ( ) ) ;
90+ invokeLambda (
91+ awsLambdaApi ,
92+ functionName ,
93+ wrapPayload ( textboxes [ 1 ] . getValue ( ) )
94+ ) ;
8895 closeModal ( ) ;
8996 } else {
9097 textboxes [ currentTextbox ] . focus ( ) ;
You can’t perform that action at this time.
0 commit comments