diff --git a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts b/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts index 28e88c9e4d8..99b9a07a4bb 100644 --- a/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts +++ b/apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts @@ -262,6 +262,7 @@ export function useEngineRemoveFromDashboard() { } export interface DeleteCloudHostedInput { + engineId: string; deploymentId: string; reason: "USING_SELF_HOSTED" | "TOO_EXPENSIVE" | "MISSING_FEATURES" | "OTHER"; feedback: string; @@ -273,12 +274,13 @@ export function useEngineDeleteCloudHosted() { return useMutation({ mutationFn: async ({ + engineId, deploymentId, reason, feedback, }: DeleteCloudHostedInput) => { const res = await fetch( - `${THIRDWEB_API_HOST}/v2/engine/deployments/${deploymentId}/infrastructure/delete`, + `${THIRDWEB_API_HOST}/v2/engine/deployments/${deploymentId}/infrastructure/delete?engineId=${engineId}`, { method: "POST", headers: { diff --git a/apps/dashboard/src/components/engine/engine-instances-table.tsx b/apps/dashboard/src/components/engine/engine-instances-table.tsx index 92ccfb59440..88a9d85cde5 100644 --- a/apps/dashboard/src/components/engine/engine-instances-table.tsx +++ b/apps/dashboard/src/components/engine/engine-instances-table.tsx @@ -387,6 +387,7 @@ function DeleteSubscriptionModalContent(props: { const [ackDeletion, setAckDeletion] = useState(false); const form = useForm({ defaultValues: { + engineId: instance.id, deploymentId: instance.deploymentId, }, reValidateMode: "onChange",