test
This commit is contained in:
		
							parent
							
								
									2eb02fc92e
								
							
						
					
					
						commit
						50860cd500
					
				@ -1523,23 +1523,18 @@ api.fetchApi = async (route, options) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const info = getSelectedWorkflowInfo();
 | 
					  const info = getSelectedWorkflowInfo();
 | 
				
			||||||
  if (info && route.startsWith("/prompt")) {
 | 
					  if (info && route.startsWith("/prompt")) {
 | 
				
			||||||
    console.log("Prompt API called");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const body = JSON.parse(options.body);
 | 
					    const body = JSON.parse(options.body);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // getData().apiKey
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const data = {
 | 
					    const data = {
 | 
				
			||||||
      client_id: body.client_id,
 | 
					      client_id: body.client_id,
 | 
				
			||||||
      workflow_api_json: body.prompt,
 | 
					      workflow_api_json: body.prompt,
 | 
				
			||||||
      workflow: body.workflow,
 | 
					      workflow: body?.extra_data?.extra_pnginfo?.workflow,
 | 
				
			||||||
      is_native_run: true,
 | 
					      is_native_run: true,
 | 
				
			||||||
      machine_id: info.machine_id,
 | 
					      machine_id: info.machine_id,
 | 
				
			||||||
      workflow_id: info.workflow_id,
 | 
					      workflow_id: info.workflow_id,
 | 
				
			||||||
      native_run_api_endpoint: info.native_run_api_endpoint,
 | 
					      native_run_api_endpoint: info.native_run_api_endpoint,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return await fetch("/comfyui-deploy/run", {
 | 
					    return await fetch("/comfyui-deploy/run", {
 | 
				
			||||||
      method: "POST",
 | 
					      method: "POST",
 | 
				
			||||||
      headers: {
 | 
					      headers: {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user