mirror of
https://github.com/langgenius/dify.git
synced 2026-01-07 23:04:12 +00:00
Feat/update notion preview (#29345)
Co-authored-by: twwu <twwu@dify.ai>
This commit is contained in:
@@ -29,7 +29,6 @@ const NotionPagePreview = ({
|
||||
return
|
||||
try {
|
||||
const res = await fetchNotionPagePreview({
|
||||
workspaceID: currentPage.workspace_id,
|
||||
pageID: currentPage.page_id,
|
||||
pageType: currentPage.type,
|
||||
credentialID: notionCredentialId,
|
||||
|
||||
@@ -185,8 +185,8 @@ export const fetchFileIndexingEstimate = (body: IndexingEstimateParams): Promise
|
||||
return post<FileIndexingEstimateResponse>('/datasets/indexing-estimate', { body })
|
||||
}
|
||||
|
||||
export const fetchNotionPagePreview = ({ workspaceID, pageID, pageType, credentialID }: { workspaceID: string; pageID: string; pageType: string; credentialID: string }): Promise<{ content: string }> => {
|
||||
return get<{ content: string }>(`notion/workspaces/${workspaceID}/pages/${pageID}/${pageType}/preview`, {
|
||||
export const fetchNotionPagePreview = ({ pageID, pageType, credentialID }: { pageID: string; pageType: string; credentialID: string }): Promise<{ content: string }> => {
|
||||
return get<{ content: string }>(`notion/pages/${pageID}/${pageType}/preview`, {
|
||||
params: {
|
||||
credential_id: credentialID,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user