Commit 7baa204e by Calcium-Ion Committed by GitHub

Fix model name length validation limit

parent 3dff0d49
...@@ -277,7 +277,7 @@ func AddChannel(c *gin.Context) { ...@@ -277,7 +277,7 @@ func AddChannel(c *gin.Context) {
// Validate the length of the model name // Validate the length of the model name
models := strings.Split(localChannel.Models, ",") models := strings.Split(localChannel.Models, ",")
for _, model := range models { for _, model := range models {
if len(model) > 256 { if len(model) > 255 {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
"message": fmt.Sprintf("模型名称过长: %s", model), "message": fmt.Sprintf("模型名称过长: %s", model),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment