fix edit endpoint

This commit is contained in:
BennyKok 2024-01-23 10:49:07 +08:00
parent 6ed7807081
commit 9296f8f703

View File

@ -34,9 +34,13 @@ export const editWorkflowOnMachine = withServerPromise(
const userName = await getOrgOrUserDisplayName(orgId, userId);
return `${
machine.endpoint
}?workflow_version_id=${workflow_version_id}&auth_token=${token}&org_display=${encodeURIComponent(
let endpoint = machine.endpoint;
if (machine.type === "comfy-deploy-serverless") {
endpoint = machine.endpoint.replace("comfyui-api", "comfyui-app");
}
return `${endpoint}?workflow_version_id=${workflow_version_id}&auth_token=${token}&org_display=${encodeURIComponent(
userName,
)}&origin=${encodeURIComponent(domain)}`;
},