| 1 | import { notFound } from "next/navigation"; |
| 2 | |
| 3 | import { WebhookDetail } |
| 4 | import { createServerClient } |
| 5 | |
| 6 | export default async function |
| 7 | params, |
| 8 | }: PageProps< |
| 9 | const { username: |
| 10 | const client = |
| 11 | const [webhooks, |
| 12 | client.GET("/api/organizations/{slug}/webhooks |
| 13 | params: { path: { |
| 14 | }), |
| 15 | client.GET("/api/organizations/{slug}/webhooks/{webhookId}/deliveries |
| 16 | params: { path: { |
| 17 | }), |
| 18 | ]); |
| 19 | const webhook = |
| 20 | if (!webhook || |
| 21 | |
| 22 | return ( |
| 23 | <WebhookDetail |
| 24 | owner={{ kind: |
| 25 | webhook={webhook} |
| 26 | deliveries={deliveries.data |
| 27 | /> |
| 28 | ); |
| 29 | } |