Minor edits for blog posts 3
This commit is contained in:
@@ -799,7 +799,6 @@ func handleConnect(swagger *openapi3.Swagger, api WorkflowApp, extraParameters [
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -909,7 +908,6 @@ func handleGet(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -1016,7 +1014,6 @@ func handleHead(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -1122,7 +1119,6 @@ func handleDelete(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -1178,9 +1174,9 @@ func handlePost(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
|
||||
Parameters: extraParameters,
|
||||
}
|
||||
|
||||
if path.Post.RequestBody != nil {
|
||||
log.Printf("RequestBody: %#v", path.Post.RequestBody)
|
||||
}
|
||||
//if path.Post.RequestBody != nil {
|
||||
// log.Printf("RequestBody: %#v", path.Post.RequestBody)
|
||||
//}
|
||||
|
||||
action.Returns.Schema.Type = "string"
|
||||
baseUrl := fmt.Sprintf("%s%s", api.Link, actualPath)
|
||||
@@ -1233,7 +1229,6 @@ func handlePost(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wo
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -1339,7 +1334,6 @@ func handlePatch(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []W
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
@@ -1446,7 +1440,6 @@ func handlePut(swagger *openapi3.Swagger, api WorkflowApp, extraParameters []Wor
|
||||
}
|
||||
|
||||
if param.Value.In == "path" {
|
||||
//log.Printf("PATH!: %s", param.Value.Name)
|
||||
parameters = append(parameters, param.Value.Name)
|
||||
//baseUrl = fmt.Sprintf("%s%s", baseUrl)
|
||||
} else if param.Value.In == "query" {
|
||||
|
||||
@@ -4648,7 +4648,7 @@ func handleDeleteOutlookSub(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, workflowId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (delete outlook): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -4782,7 +4782,7 @@ func createOutlookSub(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, workflowId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (outlook sub): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -5765,7 +5765,7 @@ func runInit(ctx context.Context) {
|
||||
|
||||
_, _, err := handleExecution(schedule.WorkflowId, Workflow{}, request)
|
||||
if err != nil {
|
||||
log.Printf("Failed to execute: %s", err)
|
||||
log.Printf("Failed to execute %s: %s", schedule.WorkflowId, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-14
@@ -428,7 +428,7 @@ func createSchedule(ctx context.Context, scheduleId, workflowId, name, frequency
|
||||
|
||||
_, _, err := handleExecution(workflowId, Workflow{}, request)
|
||||
if err != nil {
|
||||
log.Printf("Failed to execute: %s", err)
|
||||
log.Printf("Failed to execute %s: %s", workflowId, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1058,7 +1058,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (delete workflow): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -1128,7 +1128,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Println("Start")
|
||||
//log.Println("Start")
|
||||
user, userErr := handleApiAuthentication(resp, request)
|
||||
if userErr != nil {
|
||||
log.Printf("Api authentication failed in edit workflow: %s", userErr)
|
||||
@@ -1137,7 +1137,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Println("PostUser")
|
||||
//log.Println("PostUser")
|
||||
location := strings.Split(request.URL.String(), "/")
|
||||
|
||||
var fileId string
|
||||
@@ -1164,7 +1164,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
|
||||
tmpworkflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (save workflow): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -1211,7 +1211,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
// FIXME - this shouldn't be necessary with proper API checks
|
||||
newActions := []Action{}
|
||||
allNodes := []string{}
|
||||
log.Println("Pre")
|
||||
//log.Println("Pre")
|
||||
for _, action := range workflow.Actions {
|
||||
allNodes = append(allNodes, action.ID)
|
||||
|
||||
@@ -1237,7 +1237,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
workflow.Actions = newActions
|
||||
|
||||
for _, trigger := range workflow.Triggers {
|
||||
log.Println("TRIGGERS")
|
||||
//log.Println("TRIGGERS")
|
||||
allNodes = append(allNodes, trigger.ID)
|
||||
}
|
||||
|
||||
@@ -1260,7 +1260,7 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
foundNodes := []string{}
|
||||
for _, node := range allNodes {
|
||||
for _, branch := range workflow.Branches {
|
||||
log.Println("branch")
|
||||
//log.Println("branch")
|
||||
//log.Println(node)
|
||||
//log.Println(branch.DestinationID)
|
||||
if node == branch.DestinationID || node == branch.SourceID {
|
||||
@@ -1668,7 +1668,7 @@ func handleExecution(id string, workflow Workflow, request *http.Request) (Workf
|
||||
if workflow.ID == "" || workflow.ID != id {
|
||||
tmpworkflow, err := getWorkflow(ctx, id)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (execution cleanup): %s", err)
|
||||
return WorkflowExecution{}, "Failed getting workflow", err
|
||||
}
|
||||
|
||||
@@ -1993,7 +1993,7 @@ func executeWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (execute workflow): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -2064,7 +2064,7 @@ func stopSchedule(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (stop schedule): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -2153,7 +2153,7 @@ func stopScheduleGCP(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (stop schedule GCP): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -2275,7 +2275,7 @@ func scheduleWorkflow(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (schedule workflow): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
@@ -3773,7 +3773,7 @@ func getWorkflowExecutions(resp http.ResponseWriter, request *http.Request) {
|
||||
ctx := context.Background()
|
||||
workflow, err := getWorkflow(ctx, fileId)
|
||||
if err != nil {
|
||||
log.Printf("Failed getting the workflow locally: %s", err)
|
||||
log.Printf("Failed getting the workflow locally (get executions): %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(`{"success": false}`))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user