From e74db54485286ad652c31ba89df42eb378503624 Mon Sep 17 00:00:00 2001 From: UlricQin Date: Fri, 22 May 2020 13:27:07 +0800 Subject: [PATCH] node post api support chinese --- etc/transfer.yml | 1 + src/modules/monapi/http/routes/node.go | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/etc/transfer.yml b/etc/transfer.yml index 9fda3690..5071a865 100644 --- a/etc/transfer.yml +++ b/etc/transfer.yml @@ -1,4 +1,5 @@ backend: + maxConns: 20000 # in ms # connTimeout: 1000 # callTimeout: 3000 diff --git a/src/modules/monapi/http/routes/node.go b/src/modules/monapi/http/routes/node.go index a96e74e3..0d78b4bc 100644 --- a/src/modules/monapi/http/routes/node.go +++ b/src/modules/monapi/http/routes/node.go @@ -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)