mirror of
https://github.com/langgenius/dify.git
synced 2025-08-03 23:08:06 +00:00
14 lines
434 B
TypeScript
14 lines
434 B
TypeScript
import { useQuery } from '@tanstack/react-query'
|
|
import { get } from './base'
|
|
import type { DataSourceAuth } from '@/app/components/header/account-setting/data-source-page-new/types'
|
|
|
|
const NAME_SPACE = 'data-source-auth'
|
|
|
|
export const useGetDataSourceListAuth = () => {
|
|
return useQuery({
|
|
queryKey: [NAME_SPACE, 'list'],
|
|
queryFn: () => get<{ result: DataSourceAuth[] }>('/auth/plugin/datasource/list'),
|
|
retry: 0,
|
|
})
|
|
}
|