mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 08:20:45 +08:00
update types
This commit is contained in:
committed by
Gabriel Luiz Freitas Almeida
parent
e9091b9946
commit
dec53de46e
@ -8,7 +8,7 @@ export function getCurlRunCode(
|
||||
flowId: string,
|
||||
isAuth: boolean,
|
||||
tweaksBuildedObject,
|
||||
endpointName?: string,
|
||||
endpointName?: string|null,
|
||||
): string {
|
||||
const tweaksObject = tweaksBuildedObject[0];
|
||||
// show the endpoint name in the curl command if it exists
|
||||
@ -35,7 +35,7 @@ export function getCurlRunCode(
|
||||
* @param {string} options.endpointName - The name of the webhook endpoint.
|
||||
* @returns {string} The cURL command.
|
||||
*/
|
||||
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string) {
|
||||
export function getCurlWebhookCode(flowId, isAuth, endpointName?: string|null) {
|
||||
return `curl -X POST \\
|
||||
"${window.location.protocol}//${window.location.host}/api/v1/webhook/${
|
||||
endpointName || flowId
|
||||
|
||||
@ -10,7 +10,7 @@ export default function getJsApiCode(
|
||||
flowId: string,
|
||||
isAuth: boolean,
|
||||
tweaksBuildedObject: any[],
|
||||
endpointName?: string,
|
||||
endpointName?: string|null,
|
||||
): string {
|
||||
let tweaksString = "{}";
|
||||
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
||||
|
||||
@ -10,7 +10,7 @@ export default function getPythonApiCode(
|
||||
flowId: string,
|
||||
isAuth: boolean,
|
||||
tweaksBuildedObject: any[],
|
||||
endpointName?: string,
|
||||
endpointName?: string|null,
|
||||
): string {
|
||||
let tweaksString = "{}";
|
||||
if (tweaksBuildedObject && tweaksBuildedObject.length > 0) {
|
||||
|
||||
@ -3,6 +3,8 @@ export function createTabsArray(
|
||||
includeWebhookCurl = false,
|
||||
includeTweaks = false,
|
||||
) {
|
||||
// console.log(includeTweaks)
|
||||
console.log(includeWebhookCurl)
|
||||
const tabs = [
|
||||
{
|
||||
name: "Run cURL",
|
||||
|
||||
Reference in New Issue
Block a user