🐛 fix: Update channel results in data loss (#108)

This commit is contained in:
Martial BE
2024-03-13 18:34:37 +08:00
parent 05347bc9a1
commit 3aae5d262c
2 changed files with 13 additions and 4 deletions

View File

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