diff --git a/router/hook.go b/router/hook.go index c5ce629..f85a625 100644 --- a/router/hook.go +++ b/router/hook.go @@ -25,7 +25,7 @@ func (s *server) hook(ctx *gin.Context, uriCfg define.UriConfig) { ) innerContext := util.GinCtxToContext(ctx) - if responseAfter, exists = ctx.Get(consts.GinLogicAfterResponseKey); !exists || nil != responseAfter { + if responseAfter, exists = ctx.Get(consts.GinLogicAfterResponseKey); !exists || nil == responseAfter { // 未配置 logger.Instance.Debug("未配置 Logic 执行后的 hook 逻辑", pkgLogger.NewLogData(innerContext, logger.RecordType, logger.CodeLogicHook, map[string]any{ "uri": uriCfg.Path,