From 4cf9d0787e4601659a50b02fe2a1489d97d91894 Mon Sep 17 00:00:00 2001 From: Calcium-Ion <61247483+Calcium-Ion@users.noreply.github.com> Date: Sun, 5 Jan 2025 22:02:46 +0800 Subject: [PATCH] Fix model name length validation limit --- controller/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/channel.go b/controller/channel.go index 37c7ba32..b1fdd0c3 100644 --- a/controller/channel.go +++ b/controller/channel.go @@ -277,7 +277,7 @@ func AddChannel(c *gin.Context) { // Validate the length of the model name models := strings.Split(localChannel.Models, ",") for _, model := range models { - if len(model) > 256 { + if len(model) > 255 { c.JSON(http.StatusOK, gin.H{ "success": false, "message": fmt.Sprintf("模型名称过长: %s", model),