Skip to content

Commit

Permalink
Merge pull request #22 from Comm-com/development
Browse files Browse the repository at this point in the history
webhook request id
  • Loading branch information
wakirin authored Nov 29, 2024
2 parents 181f759 + 43b7835 commit c27982f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware/pingprophet/integrations/PingprophetMNP.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,16 @@ async def patch_contacts(self, pp_request):

req = {
"team_id": str(pp_request['team_id']),
"webhook_request_id": str(pp_request['webhook_request_id']),
"contacts": contacts,
}
headers = {
"Authorization": f"Bearer {team_access_token}",
"Content-Type": "application/json",
"Accept": "application/json",
}
self.logger.debug("Patching contacts (team id: %s, webhook request id: %s)", pp_request['team_id'],
pp_request['webhook_request_id'])
response = requests.post(f"{os.getenv('COMM_URL')}/api/v1/contacts/upsert", json=req, headers=headers)
self.logger.info("Contact patch response (team id: %s), Response: %s", pp_request['team_id'],
response.json())
Expand Down

0 comments on commit c27982f

Please sign in to comment.