chore: use cuids for webhooks

This commit is contained in:
Mythie
2024-02-27 12:13:56 +11:00
parent a31057d0d1
commit c2daa964c0
9 changed files with 46 additions and 30 deletions

View File

@ -33,7 +33,7 @@ type TEditWebhookFormSchema = z.infer<typeof ZEditWebhookFormSchema>;
export type WebhookPageOptions = {
params: {
id: number;
id: string;
};
};
@ -43,7 +43,7 @@ export default function WebhookPage({ params }: WebhookPageOptions) {
const { data: webhook, isLoading } = trpc.webhook.getWebhookById.useQuery(
{
id: Number(params.id),
id: params.id,
},
{ enabled: !!params.id },
);
@ -63,7 +63,7 @@ export default function WebhookPage({ params }: WebhookPageOptions) {
const onSubmit = async (data: TEditWebhookFormSchema) => {
try {
await updateWebhook({
id: Number(params.id),
id: params.id,
...data,
});