mirror of
https://github.com/langgenius/dify.git
synced 2026-01-06 06:26:00 +00:00
feat: Add name field to data source credentials update function in usePipeline service
This commit is contained in:
@@ -81,6 +81,7 @@ const Panel: FC<NodePanelProps<DataSourceNodeType>> = ({ id, data }) => {
|
||||
provider: currentDataSource?.provider || '',
|
||||
pluginId: currentDataSource?.plugin_id || '',
|
||||
credentials: value,
|
||||
name: 'd14249c6-abe3-47ad-b0f1-1e65a591e790', // todo: fake name field, need to be removed later
|
||||
})
|
||||
|
||||
notify({
|
||||
|
||||
@@ -232,12 +232,14 @@ export const useUpdateDataSourceCredentials = (
|
||||
provider,
|
||||
pluginId,
|
||||
credentials,
|
||||
}: { provider: string; pluginId: string; credentials: Record<string, any>; }) => {
|
||||
name,
|
||||
}: { provider: string; pluginId: string; credentials: Record<string, any>; name: string; }) => {
|
||||
return post('/auth/plugin/datasource', {
|
||||
body: {
|
||||
provider,
|
||||
plugin_id: pluginId,
|
||||
credentials,
|
||||
name,
|
||||
},
|
||||
}).then(() => {
|
||||
queryClient.invalidateQueries({
|
||||
|
||||
Reference in New Issue
Block a user