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-common.ts

15 lines
388 B
TypeScript

import { get } from './base'
import type {
FileUploadConfigResponse,
} from '@/models/common'
import { useQuery } from '@tanstack/react-query'
const NAME_SPACE = 'common'
export const useFileUploadConfig = () => {
return useQuery<FileUploadConfigResponse>({
queryKey: [NAME_SPACE, 'file-upload-config'],
queryFn: () => get<FileUploadConfigResponse>('/files/upload'),
})
}