node post api support chinese
This commit is contained in:
parent
5f14e76b95
commit
e74db54485
|
@ -1,4 +1,5 @@
|
|||
backend:
|
||||
maxConns: 20000
|
||||
# in ms
|
||||
# connTimeout: 1000
|
||||
# callTimeout: 3000
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue