Skip to content

Commit

Permalink
Add optional ID field to webhook registration response
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Movchan committed Jan 31, 2025
1 parent 34315ba commit 7186bc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion aana/api/request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
2 changes: 1 addition & 1 deletion aana/api/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WebhookRegistrationRequest(BaseModel):
class WebhookRegistrationResponse(BaseModel):
"""Response for a webhook registration."""

id: str
id: str | None
message: str


Expand Down

0 comments on commit 7186bc3

Please sign in to comment.