node post api support chinese

This commit is contained in:
UlricQin 2020-05-22 13:27:07 +08:00
parent 5f14e76b95
commit e74db54485
2 changed files with 1 additions and 8 deletions

View File

@ -1,4 +1,5 @@
backend:
maxConns: 20000
# in ms
# connTimeout: 1000
# callTimeout: 3000

View File

@ -35,10 +35,6 @@ func nodePost(c *gin.Context) {
errors.Bomb("leaf invalid")
}
if !str.IsMatch(f.Name, `^[a-zA-Z0-9\-]+$`) {
errors.Bomb("name valid characters: [a-zA-Z0-9] and -")
}
parent, err := model.NodeGet("id", f.Pid)
errors.Dangerous(err)
@ -73,10 +69,6 @@ func nodeNamePut(c *gin.Context) {
var f nodeNameForm
errors.Dangerous(c.ShouldBind(&f))
if !str.IsMatch(f.Name, `^[a-zA-Z0-9\-]+$`) {
errors.Bomb("name valid characters: [a-zA-Z0-9] and -")
}
node, err := model.NodeGet("id", urlParamInt64(c, "id"))
errors.Dangerous(err)