feat: remove custom context

This commit is contained in:
2025-11-01 12:27:43 +08:00
parent 36dee32db8
commit 954f6fef8a
7 changed files with 7 additions and 101 deletions

View File

@ -114,12 +114,8 @@ func (s *server) RequestHandler(uriCfg UriConfig) gin.HandlerFunc {
if uriCfg.FormDataType.Kind() != reflect.Ptr {
inputValue = inputValue.Elem()
}
if uriCfg.CtxType == CustomContextType {
customCtx := ctx.MustGet(define.CustomContextKey)
firstParam = reflect.ValueOf(customCtx)
} else {
firstParam = reflect.ValueOf(ctx)
}
firstParam = reflect.ValueOf(ctx)
resList := uriCfg.ApiLogicFunc.Func.Call([]reflect.Value{uriCfg.ApiStructValue, firstParam, inputValue})
if resList[1].IsNil() {
// 请求成功