mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-13 16:23:33 -07:00
fix invalid branch in RemapRouteParamsToBgContext
This commit is contained in:
@@ -99,9 +99,8 @@ func InjectRouteParamsToContext(ctx context.Context, rp RouteParams) context.Con
|
||||
func RemapRouteParamsToBgContext(inCtx context.Context) context.Context {
|
||||
rp, isOk := inCtx.Value(RouteParamsKey).(RouteParams)
|
||||
if !isOk {
|
||||
rp = RouteParams{}
|
||||
} else {
|
||||
logger.Warn().Msg("unable to fetch route parameters, probably jammed context")
|
||||
rp = RouteParams{}
|
||||
}
|
||||
return context.WithValue(context.Background(), RouteParamsKey, rp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user