Skip to content

Commit

Permalink
node post api support chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
UlricQin committed May 22, 2020
1 parent 5f14e76 commit e74db54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions etc/transfer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
backend:
maxConns: 20000
# in ms
# connTimeout: 1000
# callTimeout: 3000
Expand Down
8 changes: 0 additions & 8 deletions src/modules/monapi/http/routes/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit e74db54

Please sign in to comment.