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

This commit is contained in:
twwu
2025-07-02 15:08:20 +08:00
parent 68d59ee8b3
commit d7b0ccd6f7
2 changed files with 4 additions and 1 deletions

View File

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

View File

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