mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-14 20:54:30 +08:00
Go: fix go context (#18052)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -1524,7 +1524,8 @@ func (h *AgentHandler) TestDBConnection(c *gin.Context) {
|
||||
common.ResponseWithCodeData(c, common.CodeArgumentError, nil, "Invalid request: "+err.Error())
|
||||
return
|
||||
}
|
||||
code, err := h.agentService.TestDBConnection(user.ID, &req)
|
||||
ctx := c.Request.Context()
|
||||
code, err := h.agentService.TestDBConnection(ctx, user.ID, &req)
|
||||
if err != nil {
|
||||
common.ErrorWithCode(c, code, err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user