From 1adec7ab512feb64eb69dda7316fbc811f38f4b3 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 8 Mar 2024 17:13:11 +0800 Subject: [PATCH] feat: tool auth --- web/app/components/workflow/nodes/tool/use-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/nodes/tool/use-config.ts b/web/app/components/workflow/nodes/tool/use-config.ts index f2fbcabb5a..7cda773189 100644 --- a/web/app/components/workflow/nodes/tool/use-config.ts +++ b/web/app/components/workflow/nodes/tool/use-config.ts @@ -5,7 +5,7 @@ import type { ToolNodeType, ToolVarInput } from './types' import useNodeCrud from '@/app/components/workflow/nodes/_base/hooks/use-node-crud' import { CollectionType } from '@/app/components/tools/types' import type { Collection, Tool } from '@/app/components/tools/types' -import { fetchBuiltInToolList, fetchCollectionList, fetchCustomToolList } from '@/service/tools' +import { fetchBuiltInToolList, fetchCollectionList, fetchCustomToolList, updateBuiltInToolCredential } from '@/service/tools' import { addDefaultValue, toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema' import Toast from '@/app/components/base/toast' @@ -41,7 +41,7 @@ const useConfig = (id: string, payload: ToolNodeType) => { }] = useBoolean(false) const handleSaveAuth = useCallback(async (value: any) => { - // await updateBuiltInToolCredential(currCollection?.name, value) + await updateBuiltInToolCredential(currCollection?.name as string, value) Toast.notify({ type: 'success',