Ver código fonte

添加url模式

yjp 2 semanas atrás
pai
commit
f14ace432d
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      framework/core/api/router.go

+ 1 - 1
framework/core/api/router.go

@@ -236,7 +236,7 @@ func parseRelativePathPerm(basePath string, relativePathPattern string, method s
 	re := regexp.MustCompile(`\$\{(.+)\}\$`)
 	matches := re.FindStringSubmatch(relativePathPattern)
 
-	if len(matches) == 1 {
+	if len(matches) == 0 {
 		return relativePathPattern, nil, nil
 	}