From 3c0e3e4e6a6a05a30b44e3ac2f268ef9cd3a82af Mon Sep 17 00:00:00 2001 From: wolter Date: Tue, 7 May 2024 18:44:13 +0800 Subject: [PATCH] fix --- app/http/middlewares/base.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/http/middlewares/base.go b/app/http/middlewares/base.go index 14b50b5..bafa004 100644 --- a/app/http/middlewares/base.go +++ b/app/http/middlewares/base.go @@ -68,12 +68,13 @@ func ValidateRequest() gin.HandlerFunc { utils.Log(c, "path", path) controllers.HandCodeRes(c, nil, errorcode.NotFound) } else { - msg, err := controllers.GenRequest(c, handler()) + v := handler() + msg, err := controllers.GenRequest(c, v) if err != nil { utils.Log(c, "path", path) controllers.Error(c, errorcode.ParamError, msg...) } else { - c.Set("request", handler()) + c.Set("request", v) c.Next() }