authorizing

This commit is contained in:
jZonG
2025-05-23 15:59:32 +08:00
parent 62b4be9bb1
commit bbd0dbf29b
2 changed files with 35 additions and 10 deletions

View File

@ -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,