mode adding to workflow

This commit is contained in:
mr 2024-08-13 10:36:39 +02:00
parent 3962b7c7aa
commit 60fee8abe7

View File

@ -84,10 +84,10 @@ func (wfa *workflowMongoAccessor) DeleteOne(id string) (utils.DBObject, int, err
}
func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*workflow_execution.WorkflowExecution) error {
if wfa.Caller == nil || wfa.Caller.URLS == nil || wfa.Caller.URLS[utils.WORKFLOW_EXECUTION.String()] == nil {
if wfa.Caller == nil || wfa.Caller.URLS == nil || wfa.Caller.URLS[utils.BOOKING.String()] == nil {
return errors.New("no caller defined")
}
methods := wfa.Caller.URLS[utils.WORKFLOW_EXECUTION.String()]
methods := wfa.Caller.URLS[utils.BOOKING.String()]
if _, ok := methods[tools.POST]; !ok {
return errors.New("no path found")
}