mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
feat: Enhance dataset pipeline creation and management with new export and delete functionalities, improved internationalization, and refactor for better clarity
This commit is contained in:
@ -22,6 +22,8 @@ import type {
|
||||
import type { DataSourceProvider, NotionPage } from '@/models/common'
|
||||
import { post } from '../base'
|
||||
|
||||
const NAME_SPACE = 'knowledge/create-dataset'
|
||||
|
||||
export const getNotionInfo = (
|
||||
notionPages: NotionPage[],
|
||||
) => {
|
||||
@ -242,6 +244,7 @@ export const useCreateDataset = (
|
||||
mutationOptions: MutationOptions<CreateDatasetResponse, Error, CreateDatasetReq> = {},
|
||||
) => {
|
||||
return useMutation({
|
||||
mutationKey: [NAME_SPACE, 'create-dataset'],
|
||||
mutationFn: (req: CreateDatasetReq) => {
|
||||
return post<CreateDatasetResponse>('/datasets', { body: req })
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user