diff --git a/models/workflow_execution/workflow_scheduler.go b/models/workflow_execution/workflow_scheduler.go index b56cba4..b2b83ec 100644 --- a/models/workflow_execution/workflow_scheduler.go +++ b/models/workflow_execution/workflow_scheduler.go @@ -48,7 +48,7 @@ func NewScheduler(start string, end string, durationInS float64, cron string) *W } func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest) (bool, *workflow.Workflow, []*WorkflowExecutions, error) { - if request.Caller == nil && request.Caller.URLS == nil && request.Caller.URLS[tools.BOOKING] == nil || request.Caller.URLS[tools.BOOKING][tools.POST] == "" { + if request.Caller == nil && request.Caller.URLS == nil && request.Caller.URLS[tools.BOOKING] == nil || request.Caller.URLS[tools.BOOKING][tools.POSTCHECK] == "" { return false, nil, []*WorkflowExecutions{}, errors.New("no caller defined") } access := workflow.NewAccessor(nil) @@ -92,7 +92,7 @@ func (ws *WorkflowSchedule) Schedules(wfID string, request *tools.APIRequest) (* return nil, []*WorkflowExecutions{}, errors.New("no caller defined") } methods := c.URLS[tools.BOOKING] - if _, ok := methods[tools.POST]; !ok { + if _, ok := methods[tools.POSTCHECK]; !ok { return nil, []*WorkflowExecutions{}, errors.New("no path found") } ok, wf, executions, err := ws.CheckBooking(wfID, request)