add preference for pydantic objects over dicts

This commit is contained in:
SwiftyOS
2025-03-12 12:58:52 +01:00
committed by Swifty
parent 9ab5dd597b
commit ff6ad3270e

View File

@@ -47,6 +47,8 @@ class ExampleWebhookManager(ManualWebhookManagerBase):
# Set the event type based on the webhook type in the payload.
event_type = payload.get("webhook_type", ExampleWebhookEventType.EXAMPLE_EVENT)
# For the payload its better to return a pydantic model
# rather than a weakly typed dict here
return payload, event_type
async def _register_webhook(