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:
Haruko386
2026-06-18 14:19:46 +08:00
committed by GitHub
parent a9021528c3
commit 27d723e13a
2 changed files with 40 additions and 33 deletions

View File

@@ -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