From c86f39df7355242a4f67efa89c4a443637c5d4f5 Mon Sep 17 00:00:00 2001 From: Ash-exp Date: Thu, 15 Feb 2024 17:45:17 +0530 Subject: [PATCH] fix: nil pointer issue in manual sync api --- .../status/PipelineStatusTimelineRestHandler.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/api/restHandler/app/pipeline/status/PipelineStatusTimelineRestHandler.go b/api/restHandler/app/pipeline/status/PipelineStatusTimelineRestHandler.go index c3b7c931e5b..dd604e31e13 100644 --- a/api/restHandler/app/pipeline/status/PipelineStatusTimelineRestHandler.go +++ b/api/restHandler/app/pipeline/status/PipelineStatusTimelineRestHandler.go @@ -33,13 +33,18 @@ type PipelineStatusTimelineRestHandlerImpl struct { } func NewPipelineStatusTimelineRestHandlerImpl(logger *zap.SugaredLogger, + userService user.UserService, pipelineStatusTimelineService status.PipelineStatusTimelineService, enforcerUtil rbac.EnforcerUtil, - enforcer casbin.Enforcer) *PipelineStatusTimelineRestHandlerImpl { + enforcer casbin.Enforcer, cdApplicationStatusUpdateHandler cron.CdApplicationStatusUpdateHandler, + pipeline pipeline.PipelineBuilder) *PipelineStatusTimelineRestHandlerImpl { return &PipelineStatusTimelineRestHandlerImpl{ - logger: logger, - pipelineStatusTimelineService: pipelineStatusTimelineService, - enforcerUtil: enforcerUtil, - enforcer: enforcer, + logger: logger, + userService: userService, + pipelineStatusTimelineService: pipelineStatusTimelineService, + enforcerUtil: enforcerUtil, + enforcer: enforcer, + cdApplicationStatusUpdateHandler: cdApplicationStatusUpdateHandler, + pipeline: pipeline, } }