mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-29 04:08:12 +08:00
fix: fix some bugs in check_conn and drop_inst (#16180)
### What problem does this PR solve? As title: ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -452,7 +452,7 @@ func (h *ProviderHandler) CheckInstanceConnection(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
apikey, _ := instanceInfo["apikey"].(string)
|
||||
apikey, _ := instanceInfo["api_key"].(string)
|
||||
region, _ := instanceInfo["region"].(string)
|
||||
baseURL, _ := instanceInfo["base_url"].(string)
|
||||
|
||||
@@ -628,10 +628,10 @@ func (h *ProviderHandler) DropProviderInstance(c *gin.Context) {
|
||||
|
||||
userID := c.GetString("user_id")
|
||||
|
||||
_, err := h.modelProviderService.DropProviderInstances(providerName, userID, req.Instances)
|
||||
code, err := h.modelProviderService.DropProviderInstances(providerName, userID, req.Instances)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"code": common.CodeServerError,
|
||||
"code": code,
|
||||
"message": err.Error(),
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user