Merge pull request #493 from xixingya/feature/bug-fix

ratio must gte 0
This commit is contained in:
Calcium-Ion
2024-11-19 18:34:24 +08:00
committed by GitHub
3 changed files with 32 additions and 1 deletions

View File

@@ -82,6 +82,15 @@ func UpdateOption(c *gin.Context) {
})
return
}
case "GroupRatio":
err = common.CheckGroupRatio(option.Value)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": err.Error(),
})
return
}
}
err = model.UpdateOption(option.Key, option.Value)
if err != nil {