Fix: The save interface is continuously called without any operation being performed on the agent page. (#17576)

This commit is contained in:
balibabu
2026-07-31 11:23:12 +08:00
committed by GitHub
parent 0fe49688d1
commit 569a29500f
6 changed files with 24 additions and 9 deletions

View File

@@ -341,7 +341,14 @@ func (h *AgentHandler) UpdateAgent(c *gin.Context) {
common.ResponseWithCodeData(c, ec, nil, em)
return
}
common.SuccessWithData(c, true, "success")
canvas, err := h.agentService.GetAgent(c.Request.Context(), user.ID, canvasID)
if err != nil || canvas == nil {
common.SuccessWithData(c, map[string]interface{}{}, "success")
return
}
common.SuccessWithData(c, map[string]interface{}{
"update_time": canvas.UpdateTime,
}, "success")
}
// DeleteAgent removes the canvas and cascades to its versions.