From fffc7b364e4d91e2ae5289b2c37cde5746ee6240 Mon Sep 17 00:00:00 2001 From: cmeng Date: Fri, 17 Nov 2023 14:35:47 +1300 Subject: [PATCH] fix(container): Unable to create container with webhook EE-6313 (#10619) --- .../docker/containers/CreateView/useCreateMutation.tsx | 8 ++++---- app/react/portainer/webhooks/createWebhook.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/react/docker/containers/CreateView/useCreateMutation.tsx b/app/react/docker/containers/CreateView/useCreateMutation.tsx index bd37d5b5b..179daa3d7 100644 --- a/app/react/docker/containers/CreateView/useCreateMutation.tsx +++ b/app/react/docker/containers/CreateView/useCreateMutation.tsx @@ -313,10 +313,10 @@ async function createContainerWebhook( } await createWebhook({ - resourceId: containerId, - environmentId: environment.Id, - registryId, - webhookType: WebhookType.DockerContainer, + ResourceId: containerId, + EndpointID: environment.Id, + RegistryId: registryId, + WebhookType: WebhookType.DockerContainer, }); } diff --git a/app/react/portainer/webhooks/createWebhook.ts b/app/react/portainer/webhooks/createWebhook.ts index 431e26d45..bb60f1c07 100644 --- a/app/react/portainer/webhooks/createWebhook.ts +++ b/app/react/portainer/webhooks/createWebhook.ts @@ -7,10 +7,10 @@ import { buildUrl } from './build-url'; import { Webhook, WebhookType } from './types'; interface CreateWebhookPayload { - resourceId: string; - environmentId: EnvironmentId; - registryId?: RegistryId; - webhookType: WebhookType; + ResourceId: string; + EndpointID: EnvironmentId; + RegistryId?: RegistryId; + WebhookType: WebhookType; } export async function createWebhook(payload: CreateWebhookPayload) {