This is an automated email from the ASF dual-hosted git repository.

hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-gateway.git


The following commit(s) were added to refs/heads/master by this push:
     new 0724706  fix(agent): call the renamed targetItems from AddMcp
0724706 is described below

commit 0724706cc680147b10155c75a4a7a0e19694206a
Author: Yang Luo <[email protected]>
AuthorDate: Fri Aug 21 21:09:47 2026 +0800

    fix(agent): call the renamed targetItems from AddMcp
---
 agentconfig/mcp_add.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/agentconfig/mcp_add.go b/agentconfig/mcp_add.go
index f965a9d..18a2c2a 100644
--- a/agentconfig/mcp_add.go
+++ b/agentconfig/mcp_add.go
@@ -63,12 +63,12 @@ func AddMcp(request McpRequest) ([]*PlanItem, error) {
                item := &PlanItem{AgentId: agentId, Name: name}
                planned = append(planned, item)
 
-               existing, err := targetNames(agentId, request.Owner, KindMcp)
+               existing, err := targetItems(agentId, request.Owner, KindMcp)
                switch {
                case err != nil:
                        item.Action, item.Reason = ActionSkip, err.Error()
                        continue
-               case !existing[name]:
+               case existing[name] == nil:
                        item.Action = ActionCreate
                case request.Overwrite:
                        item.Action = ActionOverwrite


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to