webhooks: add a webhook from its own pagea3f4d6e13 days ago18 lines · 635 B | 1 | import { notFound } from "next/navigation"; |
| 2 | |
| 3 | import { WebhookList } |
| 4 | import { createServerClient } |
| 5 | |
| 6 | export default async function |
| 7 | params, |
| 8 | }: PageProps< |
| 9 | const { username: |
| 10 | const client = |
| 11 | const { data |
| 12 | params: { path: { |
| 13 | }); |
| 14 | if (!data) |
| 15 | const owner = |
| 16 | |
| 17 | return <WebhookList owner |
| 18 | } |
from
"
@/components/webhooks/webhook-list
"
;
from
"
@/lib/api/server
"
;
OrganizationWebhooksPage
(
{
"
/[username]/settings/webhooks
"
>
)
{
slug
}
=
await
params
;
await
createServerClient
()
;
}
=
await
client
.
GET
(
"
/api/organizations/{slug}/webhooks
"
,
{
slug
}
}
,
notFound
()
;
{
kind
:
"
organization
"
as
const
,
slug
}
;
=
{
owner
}
webhooks
=
{
data
.
webhooks
}
/>
;