mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-07 22:53:41 +08:00
fix: limit the shown text's length (close #80)
This commit is contained in:
@@ -467,6 +467,13 @@ func CreateUser(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := common.Validate.Struct(&user); err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": "输入不合法 " + err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
if user.DisplayName == "" {
|
||||
user.DisplayName = user.Username
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user