feat(backend): watches report alert counts, alerts carry watch params and time away, webhooks their last delivery

This commit is contained in:
hh committed 2026-10-19 02:57:27 +00:00
1 parent 9da0c06ac1
commit 6a4fd6ad47
4 files changed
+76 -37

No files matched your search

+4 -1
View File
@@ -61,13 +61,16 @@ async def list_webhooks(
async def create_webhook(
pool: FromDishka[asyncpg.Pool], body: WebhookCreate
) -> WebhookView:
return await webhooks.create_webhook(
webhook = await webhooks.create_webhook(
pool,
body.account_id,
_url(body.url),
_watch_ids(body.watch_ids),
enabled=body.enabled,
)
if webhook is None:
raise HTTPException(status_code=500, detail="webhook was not saved")
return webhook
@router.put("/{webhook_id}")