mirror of
https://github.com/langgenius/dify.git
synced 2026-04-12 22:17:09 +08:00
refactor(notion-page-preview): update fetchNotionPagePreview to include pageType parameter for improved API request
This commit is contained in:
parent
771ea54a0b
commit
ef64729771
@ -31,6 +31,7 @@ const NotionPagePreview = ({
|
||||
const res = await fetchNotionPagePreview({
|
||||
workspaceID: currentPage.workspace_id,
|
||||
pageID: currentPage.page_id,
|
||||
pageType: currentPage.type,
|
||||
credentialID: notionCredentialId,
|
||||
})
|
||||
setPreviewContent(res.content)
|
||||
|
||||
@ -183,8 +183,8 @@ export const fetchFileIndexingEstimate: Fetcher<FileIndexingEstimateResponse, In
|
||||
return post<FileIndexingEstimateResponse>('/datasets/indexing-estimate', { body })
|
||||
}
|
||||
|
||||
export const fetchNotionPagePreview: Fetcher<{ content: string }, { workspaceID: string; pageID: string; credentialID: string; }> = ({ workspaceID, pageID, credentialID }) => {
|
||||
return get<{ content: string }>(`notion/workspaces/${workspaceID}/pages/${pageID}/preview`, {
|
||||
export const fetchNotionPagePreview: Fetcher<{ content: string }, { workspaceID: string; pageID: string; pageType: string; credentialID: string; }> = ({ workspaceID, pageID, pageType, credentialID }) => {
|
||||
return get<{ content: string }>(`notion/workspaces/${workspaceID}/pages/${pageID}/${pageType}/preview`, {
|
||||
params: {
|
||||
credential_id: credentialID,
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user