Skip to content

Commit 131576d

Browse files
committed
fix: Engine deletion endpoint requires engineId
1 parent 7a9713e commit 131576d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ export function useEngineRemoveFromDashboard() {
262262
}
263263

264264
export interface DeleteCloudHostedInput {
265+
engineId: string;
265266
deploymentId: string;
266267
reason: "USING_SELF_HOSTED" | "TOO_EXPENSIVE" | "MISSING_FEATURES" | "OTHER";
267268
feedback: string;
@@ -273,12 +274,13 @@ export function useEngineDeleteCloudHosted() {
273274

274275
return useMutation({
275276
mutationFn: async ({
277+
engineId,
276278
deploymentId,
277279
reason,
278280
feedback,
279281
}: DeleteCloudHostedInput) => {
280282
const res = await fetch(
281-
`${THIRDWEB_API_HOST}/v2/engine/deployments/${deploymentId}/infrastructure/delete`,
283+
`${THIRDWEB_API_HOST}/v2/engine/deployments/${deploymentId}/infrastructure/delete?engineId=${engineId}`,
282284
{
283285
method: "POST",
284286
headers: {

apps/dashboard/src/components/engine/engine-instances-table.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ function DeleteSubscriptionModalContent(props: {
387387
const [ackDeletion, setAckDeletion] = useState(false);
388388
const form = useForm<DeleteCloudHostedInput>({
389389
defaultValues: {
390+
engineId: instance.id,
390391
deploymentId: instance.deploymentId,
391392
},
392393
reValidateMode: "onChange",

0 commit comments

Comments
 (0)