Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Fix validate_event call: use body= instead of payload=, cast headers to dict

Daoud Clarkeacdd089853cd
diff --git a/mwmbl/platform/api.py b/mwmbl/platform/api.py
index 094ec7c..46eb7d7 100644
--- a/mwmbl/platform/api.py
+++ b/mwmbl/platform/api.py
@@ -642,8 +642,8 @@ def polar_webhook(request):
logger.info("Polar webhook received")
try:
event = validate_event(
- payload=request.body,
- headers=request.headers,
+ body=request.body,
+ headers=dict(request.headers),
secret=settings.POLAR_WEBHOOK_SECRET,
)
except WebhookVerificationError: