diff --git a/backend/go-app/codegen.go b/backend/go-app/codegen.go index 854c6f48..5ac9340a 100644 --- a/backend/go-app/codegen.go +++ b/backend/go-app/codegen.go @@ -313,7 +313,7 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet //verifyParam := "" //verifyWrapper := "" //verifyAddin := "" - verifyParam := ", verify=False" + verifyParam := ", ssl_verify=False" verifyWrapper := `if type(ssl_verify) == str: ssl_verify = False if ssl_verify.lower() == "false" or ssl_verify == "0" else True` verifyAddin := ", verify=ssl_verify" diff --git a/docker-compose.yml b/docker-compose.yml index 02efa84a..a8097114 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: depends_on: - backend backend: - #build: ./backend + build: ./backend image: frikky/shuffle:backend container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 315cea51..ae8216e2 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -1865,7 +1865,6 @@ const AngularWorkflow = (props) => { } const syncEnabled = props.userdata !== undefined && props.userdata.selected_org !== null && props.userdata.selected_org !== undefined ? props.userdata.selected_org.cloud_sync === true : false - console.log("SYNC: ", syncEnabled) const triggers = [{ "name": "Webhook", "type": "TRIGGER", diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index 257bf640..013ae5c2 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -376,16 +376,6 @@ const AppCreator = (props) => { } } - - if (data.servers !== undefined && data.servers.length > 0) { - var firstUrl = data.servers[0].url - if (firstUrl.endsWith("/")) { - setBaseUrl(firstUrl.slice(0, firstUrl.length-1)) - } else { - setBaseUrl(firstUrl) - } - } - if (data.tags !== undefined && data.tags.length > 0) { for (var key in data.tags) { newWorkflowTags.push(data.tags[key].name) @@ -425,7 +415,6 @@ const AppCreator = (props) => { } if (!allowedfunctions.includes(method.toUpperCase())) { - console.log(method, path) continue } @@ -532,6 +521,30 @@ const AppCreator = (props) => { } newActions.push(newaction) } + + if (data.servers !== undefined && data.servers.length > 0) { + var firstUrl = data.servers[0].url + if (firstUrl.includes("{") && firstUrl.includes("}") && data.servers[0].variables !== undefined) { + const regex = /{\w+}/g + const found = firstUrl.match(regex) + if (found !== null) { + for (var key in found) { + const item = found[key].slice(1, found[key].length-1) + const foundVar = data.servers[0].variables[item] + if (foundVar["default"] !== undefined) { + firstUrl = firstUrl.replace(found[key], foundVar["default"]) + } + } + + } + } + + if (firstUrl.endsWith("/")) { + setBaseUrl(firstUrl.slice(0, firstUrl.length-1)) + } else { + setBaseUrl(firstUrl) + } + } }