支持custom context #10
| @ -87,8 +87,9 @@ func RequestHandler(uriCfg UriConfig) gin.HandlerFunc { | |||||||
| 			inputValue = inputValue.Elem() | 			inputValue = inputValue.Elem() | ||||||
| 		} | 		} | ||||||
| 		var firstParam reflect.Value | 		var firstParam reflect.Value | ||||||
| 		if uriCfg.CtxType == define.CustomContextKey { | 		if uriCfg.CtxType == CustomContextType { | ||||||
| 			firstParam = reflect.ValueOf(ctx.MustGet(define.CustomContextKey)) | 			customCtx := ctx.MustGet(define.CustomContextKey) | ||||||
|  | 			firstParam = reflect.ValueOf(customCtx) | ||||||
| 		} else { | 		} else { | ||||||
| 			firstParam = reflect.ValueOf(ctx) | 			firstParam = reflect.ValueOf(ctx) | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user