Added proxy options

This commit is contained in:
frikky
2020-07-05 11:25:08 +02:00
parent bd5f8226ad
commit 5cb19669be
9 changed files with 80 additions and 10 deletions
+8 -1
View File
@@ -1375,7 +1375,7 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) {
resp.Write([]byte(`{"success": true}`))
}
// FIXME - check whether all nodes has a branch, otherwise go back
// Saves a workflow to an ID
func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
cors := handleCors(resp, request)
if cors {
@@ -1462,6 +1462,11 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
return
}
// Fixing wrong owners when importing
if workflow.Owner == "" {
workflow.Owner = user.Id
}
// FIXME - this shouldn't be necessary with proper API checks
newActions := []Action{}
allNodes := []string{}
@@ -1491,6 +1496,8 @@ func saveWorkflow(resp http.ResponseWriter, request *http.Request) {
workflow.Actions = newActions
for _, trigger := range workflow.Triggers {
log.Printf("Trigger %s: %s", trigger.TriggerType, trigger.Status)
//log.Println("TRIGGERS")
allNodes = append(allNodes, trigger.ID)
}