mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
feat(rag): pass credentialId to online document preview and wire to data source store
This commit is contained in:
@ -340,12 +340,13 @@ export const usePreviewOnlineDocument = () => {
|
||||
return useMutation({
|
||||
mutationKey: [NAME_SPACE, 'preview-online-document'],
|
||||
mutationFn: (params: OnlineDocumentPreviewRequest) => {
|
||||
const { pipelineId, datasourceNodeId, workspaceID, pageID, pageType } = params
|
||||
const { pipelineId, datasourceNodeId, workspaceID, pageID, pageType, credentialId } = params
|
||||
return post<OnlineDocumentPreviewResponse>(
|
||||
`/rag/pipelines/${pipelineId}/workflows/published/datasource/nodes/${datasourceNodeId}/preview`,
|
||||
{
|
||||
body: {
|
||||
datasource_type: DatasourceType.onlineDocument,
|
||||
credential_id: credentialId,
|
||||
inputs: {
|
||||
workspace_id: workspaceID,
|
||||
page_id: pageID,
|
||||
|
||||
Reference in New Issue
Block a user