mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
authorizing
This commit is contained in:
@ -141,6 +141,17 @@ export const useDeleteMCP = ({
|
||||
})
|
||||
}
|
||||
|
||||
export const useAuthorizeMCP = () => {
|
||||
return useMutation({
|
||||
mutationKey: [NAME_SPACE, 'authorize-mcp'],
|
||||
mutationFn: (payload: { provider_id: string; server_url: string }) => {
|
||||
return post('/workspaces/current/tool-provider/mcp/auth', {
|
||||
body: payload,
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const useMCPTools = (providerID: string) => {
|
||||
return useQuery({
|
||||
enabled: !!providerID,
|
||||
|
||||
Reference in New Issue
Block a user