Skip to content

Commit

Permalink
chore: code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 committed Nov 14, 2023
1 parent 2085b0b commit 6c11723
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/cdk/v2/destinations/gladly/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ steps:
response.method = "POST"
response.headers = $.getHeaders(.destination)
response
- name: updateCustomer
description: Build response for update customer
condition: $.outputs.findCustomer.status === 200 && $.outputs.findCustomer.response.length > 0
template: |
const response = $.defaultRequestConfig()
response.body.JSON = $.removeUndefinedAndNullValues($.context.payload.{~["id"]})
response.endpoint = $.getEndpoint(.destination) + "/" + $.outputs.findCustomer.response[0].id
response.method = "PATCH"
response.headers = $.getHeaders(.destination)
response
else:
name: updateCustomer
description: Build response for update customer
template: |
const response = $.defaultRequestConfig()
response.body.JSON = $.removeUndefinedAndNullValues($.context.payload.{~["id"]})
response.endpoint = $.getEndpoint(.destination) + "/" + $.outputs.findCustomer.response[0].id
response.method = "PATCH"
response.headers = $.getHeaders(.destination)
response

0 comments on commit 6c11723

Please sign in to comment.