mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-17 05:33:42 +08:00
🐛 fix: Update channel results in data loss (#108)
This commit is contained in:
@@ -132,7 +132,11 @@ func UpdateChannel(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
err = channel.Update()
|
||||
if channel.Models == "" {
|
||||
err = channel.Update(false)
|
||||
} else {
|
||||
err = channel.Update(true)
|
||||
}
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
|
||||
Reference in New Issue
Block a user