feat: Add name field to data source credentials update function in usePipeline service

feat/rag-pipeline
twwu 7 months ago
parent 68d59ee8b3
commit d7b0ccd6f7

@ -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({

Loading…
Cancel
Save