fix import json

This commit is contained in:
Ramnique Singh 2025-08-13 16:40:31 +05:30
parent aeecbd1433
commit beee4306ac

View file

@ -126,13 +126,9 @@ export async function createProjectFromWorkflowJson(formData: FormData): Promise
const name = formData.get('name') as string | null;
const workflowJson = formData.get('workflowJson') as string;
const { agents, prompts, tools, pipelines, startAgent } = Workflow.parse(JSON.parse(workflowJson));
const workflow = Workflow.parse(JSON.parse(workflowJson));
const response = await createBaseProject(name || 'Imported project', user, {
agents,
prompts,
tools,
pipelines,
startAgent,
...workflow,
lastUpdatedAt: (new Date()).toISOString(),
});
if ('billingError' in response) {