chore: commit all pending changes
This commit is contained in:
@@ -5,6 +5,12 @@ from pathlib import Path
|
||||
from urllib import request
|
||||
|
||||
|
||||
def _payload_for_webhook(payload: dict) -> dict:
|
||||
outbound = dict(payload)
|
||||
outbound.pop("tracks", None)
|
||||
return outbound
|
||||
|
||||
|
||||
def dispatch_json_event(
|
||||
path: str | Path,
|
||||
payload: dict,
|
||||
@@ -21,7 +27,7 @@ def dispatch_json_event(
|
||||
|
||||
req = request.Request(
|
||||
url=webhook_url,
|
||||
data=json.dumps(payload).encode("utf-8"),
|
||||
data=json.dumps(_payload_for_webhook(payload)).encode("utf-8"),
|
||||
method="POST",
|
||||
)
|
||||
req.add_header("Content-Type", "application/json")
|
||||
|
||||
Reference in New Issue
Block a user