Fixed app creator problems from looping
This commit is contained in:
@@ -2,7 +2,7 @@ module main
|
|||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
|
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go/datastore v1.10.0
|
cloud.google.com/go/datastore v1.10.0
|
||||||
@@ -19,7 +19,7 @@ require (
|
|||||||
github.com/gorilla/mux v1.8.0
|
github.com/gorilla/mux v1.8.0
|
||||||
github.com/h2non/filetype v1.1.3
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/shuffle/shuffle-shared v0.3.51
|
github.com/shuffle/shuffle-shared v0.3.52
|
||||||
golang.org/x/crypto v0.3.0
|
golang.org/x/crypto v0.3.0
|
||||||
google.golang.org/api v0.103.0
|
google.golang.org/api v0.103.0
|
||||||
google.golang.org/appengine v1.6.7
|
google.golang.org/appengine v1.6.7
|
||||||
|
|||||||
@@ -2336,7 +2336,7 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OrgId: activeOrgs[0].Id,
|
// OrgId: activeOrgs[0].Id,
|
||||||
workflowExecution, executionResp, err := handleExecution(ctx, item, workflow, newRequest)
|
workflowExecution, executionResp, err := handleExecution(item, workflow, newRequest, hook.OrgId)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if hook.Version == "v2" {
|
if hook.Version == "v2" {
|
||||||
@@ -2378,6 +2378,7 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
|||||||
resp.WriteHeader(500)
|
resp.WriteHeader(500)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "%s"}`, executionResp)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "%s"}`, executionResp)))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func executeCloudAction(action shuffle.CloudSyncJob, apikey string) error {
|
func executeCloudAction(action shuffle.CloudSyncJob, apikey string) error {
|
||||||
|
|||||||
@@ -222,6 +222,14 @@ const parseCurl = (s) => {
|
|||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const base64_decode = (str) => {
|
||||||
|
return decodeURIComponent(
|
||||||
|
atob(str).split("").map(function (c) {
|
||||||
|
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
||||||
|
}).join("")
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// Should be different if logged in :|
|
// Should be different if logged in :|
|
||||||
const AppCreator = (defaultprops) => {
|
const AppCreator = (defaultprops) => {
|
||||||
const { globalUrl, isLoaded } = defaultprops;
|
const { globalUrl, isLoaded } = defaultprops;
|
||||||
@@ -527,16 +535,7 @@ const AppCreator = (defaultprops) => {
|
|||||||
return newitem;
|
return newitem;
|
||||||
};
|
};
|
||||||
|
|
||||||
const base64_decode = (str) => {
|
|
||||||
return decodeURIComponent(
|
|
||||||
atob(str)
|
|
||||||
.split("")
|
|
||||||
.map(function (c) {
|
|
||||||
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
||||||
})
|
|
||||||
.join("")
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Sets the data up as it should be at later points
|
// Sets the data up as it should be at later points
|
||||||
// This is the data FROM the database, not what's being saved
|
// This is the data FROM the database, not what's being saved
|
||||||
@@ -1889,7 +1888,9 @@ const AppCreator = (defaultprops) => {
|
|||||||
queryitem.name.toLowerCase() == "ssl_verify" ||
|
queryitem.name.toLowerCase() == "ssl_verify" ||
|
||||||
queryitem.name.toLowerCase() == "queries" ||
|
queryitem.name.toLowerCase() == "queries" ||
|
||||||
queryitem.name.toLowerCase() == "headers" ||
|
queryitem.name.toLowerCase() == "headers" ||
|
||||||
queryitem.name.toLowerCase() == "access_token" ||
|
queryitem.name.toLowerCase() == "access_token") {
|
||||||
|
/*
|
||||||
|
|
||||||
queryitem.name.includes("[") ||
|
queryitem.name.includes("[") ||
|
||||||
queryitem.name.includes("]") ||
|
queryitem.name.includes("]") ||
|
||||||
queryitem.name.includes("{") ||
|
queryitem.name.includes("{") ||
|
||||||
@@ -1910,10 +1911,11 @@ const AppCreator = (defaultprops) => {
|
|||||||
queryitem.name.includes('"') ||
|
queryitem.name.includes('"') ||
|
||||||
queryitem.name.includes("'")
|
queryitem.name.includes("'")
|
||||||
) {
|
) {
|
||||||
console.log(
|
*/
|
||||||
item.name + " error: uses a bad query - not adding: ",
|
console.log(item.name + " error: uses a bad query - not adding: ",queryitem.name)
|
||||||
queryitem.name
|
|
||||||
)
|
|
||||||
|
// Find a replacement for the invalid ones first.
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -3922,11 +3924,15 @@ const AppCreator = (defaultprops) => {
|
|||||||
//console.log("Actions: ", actions)
|
//console.log("Actions: ", actions)
|
||||||
|
|
||||||
if (baseUrl.length === 0 && parsedurl.includes("http")) {
|
if (baseUrl.length === 0 && parsedurl.includes("http")) {
|
||||||
const newurl = new URL(encodeURI(parsedurl))
|
try {
|
||||||
newurl.searchParams.delete(parameterName)
|
const newurl = new URL(encodeURI(parsedurl))
|
||||||
console.log("New url: ", newurl)
|
newurl.searchParams.delete(parameterName)
|
||||||
parsedurl = newurl.pathname
|
console.log("New url: ", newurl)
|
||||||
setBaseUrl(newurl.origin)
|
parsedurl = newurl.pathname
|
||||||
|
setBaseUrl(newurl.origin)
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Failed to parse URL: ", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.target.value !== parsedurl) {
|
if (event.target.value !== parsedurl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user