Merge pull request #60 from bufanyun/v2.0

up
This commit is contained in:
maxbad 2024-04-10 14:04:40 +08:00 committed by GitHub
commit 0dddbcd50c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ func (s *sMiddleware) GenRouteKey(method, path string) string {
// PreFilter 请求输入预处理 // PreFilter 请求输入预处理
// api使用gf规范路由并且XxxReq结构体实现了validate.Filter接口即可 // api使用gf规范路由并且XxxReq结构体实现了validate.Filter接口即可
func (s *sMiddleware) PreFilter(r *ghttp.Request) { func (s *sMiddleware) PreFilter(r *ghttp.Request) {
router, ok := s.GetFilterRoutes(r)[s.GenFilterRouteKey(r.Router)] router, ok := s.GetFilterRoutes(r)[s.GenFilterRequestKey(r)]
if !ok { if !ok {
r.Middleware.Next() r.Middleware.Next()
return return