Closes #3451: Add pre-/post-change snapshots to webhooks

This commit is contained in:
Jeremy Stretch
2021-03-09 13:03:44 -05:00
parent c083b862a7
commit c6641ec1de
5 changed files with 70 additions and 25 deletions
+3 -2
View File
@@ -12,7 +12,7 @@ logger = logging.getLogger('netbox.webhooks_worker')
@job('default')
def process_webhook(webhook, data, model_name, event, timestamp, username, request_id):
def process_webhook(webhook, model_name, event, data, snapshots, timestamp, username, request_id):
"""
Make a POST request to the defined Webhook
"""
@@ -22,7 +22,8 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
'model': model_name,
'username': username,
'request_id': request_id,
'data': data
'data': data,
'snapshots': snapshots,
}
# Build the headers for the HTTP request