修复 custom context 判断的BUG
This commit is contained in:
parent
e0d5e9c94b
commit
54a8fa91c7
@ -87,8 +87,9 @@ func RequestHandler(uriCfg UriConfig) gin.HandlerFunc {
|
||||
inputValue = inputValue.Elem()
|
||||
}
|
||||
var firstParam reflect.Value
|
||||
if uriCfg.CtxType == define.CustomContextKey {
|
||||
firstParam = reflect.ValueOf(ctx.MustGet(define.CustomContextKey))
|
||||
if uriCfg.CtxType == CustomContextType {
|
||||
customCtx := ctx.MustGet(define.CustomContextKey)
|
||||
firstParam = reflect.ValueOf(customCtx)
|
||||
} else {
|
||||
firstParam = reflect.ValueOf(ctx)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user