Commit 1adec7ab authored by Joel's avatar Joel

feat: tool auth

parent 3b029f23
...@@ -5,7 +5,7 @@ import type { ToolNodeType, ToolVarInput } from './types' ...@@ -5,7 +5,7 @@ import type { ToolNodeType, ToolVarInput } from './types'
import useNodeCrud from '@/app/components/workflow/nodes/_base/hooks/use-node-crud' import useNodeCrud from '@/app/components/workflow/nodes/_base/hooks/use-node-crud'
import { CollectionType } from '@/app/components/tools/types' import { CollectionType } from '@/app/components/tools/types'
import type { Collection, Tool } 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 { addDefaultValue, toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
import Toast from '@/app/components/base/toast' import Toast from '@/app/components/base/toast'
...@@ -41,7 +41,7 @@ const useConfig = (id: string, payload: ToolNodeType) => { ...@@ -41,7 +41,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
}] = useBoolean(false) }] = useBoolean(false)
const handleSaveAuth = useCallback(async (value: any) => { const handleSaveAuth = useCallback(async (value: any) => {
// await updateBuiltInToolCredential(currCollection?.name, value) await updateBuiltInToolCredential(currCollection?.name as string, value)
Toast.notify({ Toast.notify({
type: 'success', type: 'success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment