mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 20:15:52 +08:00
fix: auto authorizing
This commit is contained in:
parent
953746bf7e
commit
049f904af8
@ -68,13 +68,18 @@ const MCPList = ({
|
|||||||
const handleCreate = async (provider: ToolWithProvider) => {
|
const handleCreate = async (provider: ToolWithProvider) => {
|
||||||
await refetch() // update list
|
await refetch() // update list
|
||||||
setCurrentProviderID(provider.id)
|
setCurrentProviderID(provider.id)
|
||||||
await authorizeMcp({
|
const res = await authorizeMcp({
|
||||||
provider_id: provider.id,
|
provider_id: provider.id,
|
||||||
})
|
})
|
||||||
await refetch() // update authorization in list
|
if (res.result === 'success') {
|
||||||
await updateTools(provider.id)
|
await refetch() // update authorization in list
|
||||||
invalidateMCPTools(provider.id)
|
await updateTools(provider.id)
|
||||||
await refetch() // update tool list in provider list
|
invalidateMCPTools(provider.id)
|
||||||
|
await refetch() // update tool list in provider list
|
||||||
|
}
|
||||||
|
else if (res.authorization_url) {
|
||||||
|
router.push(res.authorization_url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleUpdateAuthorization = async (providerID: string, code: string) => {
|
const handleUpdateAuthorization = async (providerID: string, code: string) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user