codegen-assets icon indicating copy to clipboard operation
codegen-assets copied to clipboard

destructure the request payload for better readability of the generated code

Open wawhal opened this issue 4 years ago • 0 comments

We can generate:

const {
  input: { arg1, arg2 },
  session_variables,
  action: { name: actionName }
} = req.body;

Currently we just generate:

const { arg1, arg2 } = req.body.input;

wawhal avatar Apr 13 '20 13:04 wawhal