Commit 0b896d4f by Seefs Committed by GitHub

Merge pull request #2368 from oudi/main

Increase token name length limit from 30 to 50
parents 43c1068e 7cd4de3f
...@@ -142,7 +142,7 @@ func AddToken(c *gin.Context) { ...@@ -142,7 +142,7 @@ func AddToken(c *gin.Context) {
common.ApiError(c, err) common.ApiError(c, err)
return return
} }
if len(token.Name) > 30 { if len(token.Name) > 50 {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
"message": "令牌名称过长", "message": "令牌名称过长",
...@@ -208,7 +208,7 @@ func UpdateToken(c *gin.Context) { ...@@ -208,7 +208,7 @@ func UpdateToken(c *gin.Context) {
common.ApiError(c, err) common.ApiError(c, err)
return return
} }
if len(token.Name) > 30 { if len(token.Name) > 50 {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
"message": "令牌名称过长", "message": "令牌名称过长",
......
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