mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
Go: fix warnings (#17738)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ func (h *AgentHandler) GetComponentInputForm(c *gin.Context) {
|
||||
|
||||
cv, err := h.loader.LoadCanvasByID(c.Request.Context(), user.ID, canvasID)
|
||||
if err != nil {
|
||||
if err == dao.ErrUserCanvasNotFound {
|
||||
if errors.Is(err, dao.ErrUserCanvasNotFound) {
|
||||
common.ResponseWithCodeData(c, common.CodeOperatingError, nil, canvasNoAccessMessage)
|
||||
return
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (h *AgentHandler) DebugComponent(c *gin.Context) {
|
||||
|
||||
cv, err := h.loader.LoadCanvasByID(c.Request.Context(), user.ID, canvasID)
|
||||
if err != nil {
|
||||
if err == dao.ErrUserCanvasNotFound {
|
||||
if errors.Is(err, dao.ErrUserCanvasNotFound) {
|
||||
common.ResponseWithCodeData(c, common.CodeOperatingError, nil, canvasNoAccessMessage)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user