light modification
This commit is contained in:
parent
67ebeca1f4
commit
67940296d2
@ -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) {
|
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")
|
return false, nil, []*WorkflowExecutions{}, errors.New("no caller defined")
|
||||||
}
|
}
|
||||||
access := workflow.NewAccessor(nil)
|
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")
|
return nil, []*WorkflowExecutions{}, errors.New("no caller defined")
|
||||||
}
|
}
|
||||||
methods := c.URLS[tools.BOOKING]
|
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")
|
return nil, []*WorkflowExecutions{}, errors.New("no path found")
|
||||||
}
|
}
|
||||||
ok, wf, executions, err := ws.CheckBooking(wfID, request)
|
ok, wf, executions, err := ws.CheckBooking(wfID, request)
|
||||||
|
Loading…
Reference in New Issue
Block a user