You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/service/use-workflow.ts

13 lines
388 B
TypeScript

import { useQuery } from '@tanstack/react-query'
import { get } from './base'
import type { WorkflowConfigResponse } from '@/types/workflow'
const NAME_SPACE = 'workflow'
export const useWorkflowConfig = (appId: string) => {
return useQuery({
queryKey: [NAME_SPACE, 'config', appId],
queryFn: () => get<WorkflowConfigResponse>(`/apps/${appId}/workflows/draft/config`),
})
}