diff --git a/aana/api/request_handler.py b/aana/api/request_handler.py index fa4e3ad5..2de7d3ec 100644 --- a/aana/api/request_handler.py +++ b/aana/api/request_handler.py @@ -370,4 +370,6 @@ async def register_webhook( webhook_repo.save(webhook) except Exception: return WebhookRegistrationResponse(message="Failed to register webhook") - return WebhookRegistrationResponse(message="Webhook registered successfully") + return WebhookRegistrationResponse( + id=str(webhook.id), message="Webhook registered successfully" + ) diff --git a/aana/api/webhook.py b/aana/api/webhook.py index a2d8769e..bab30184 100644 --- a/aana/api/webhook.py +++ b/aana/api/webhook.py @@ -38,7 +38,7 @@ class WebhookRegistrationRequest(BaseModel): class WebhookRegistrationResponse(BaseModel): """Response for a webhook registration.""" - id: str + id: str | None message: str