Skip to content

Commit

Permalink
docs(samples): hardcode parameter in webhook sample (#268)
Browse files Browse the repository at this point in the history
* streamline and clarify webhook samples

Change-Id: I80d80b42f60ac6ccc643afb7b2931916d6843813

* remove sessionInfo config

Change-Id: I1b14852ad9e238e7cdc04dbb418ed5ed0fca2992

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* hardcode parameter

Change-Id: Iea962f2ea2bf73ca86ce3ecd7852a290dd3a2fac

* clarify parameter name

Change-Id: I5c0a1c654be5133889f4838a118e5bdebe667303

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Ace Nassri committed Nov 17, 2022
1 parent fe6cb09 commit 7afa36f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
exports.configureOptionalFormParam = (request, response) => {
// The value of the parameter that the webhook will set as optional or required.
// Note that the webhook cannot add or remove any form parameter
const parameter = request.body.pageInfo.formInfo.parameterInfo[0].value;

const jsonResponse = {
pageInfo: {
formInfo: {
parameterInfo: [
{
displayName: parameter,
displayName: 'order-number',
// if required: false, the agent will not reprompt for this parameter, even if the state is 'INVALID'
required: true,
state: 'VALID',
Expand Down

0 comments on commit 7afa36f

Please sign in to comment.