Fixed issue with loss of data when swapping actions - now copying!

This commit is contained in:
frikky
2022-01-08 03:44:45 +01:00
parent c41b4da5f5
commit 54647e10af
6 changed files with 49 additions and 15 deletions
+16 -4
View File
@@ -681,7 +681,12 @@ class AppBase:
except KeyError:
break
else:
raise e
raise json.dumps({
"success": False,
"reason": "You may be running an old version of this action. Please delete and remake the node.",
"exception": f"TypeError: {e}",
})
except:
e = ""
@@ -2389,7 +2394,11 @@ class AppBase:
for parameter in action["parameters"]:
check, value, is_loop = parse_params(action, fullexecution, parameter, self)
if check:
raise "Value check error: %s" % Exception(check)
raise json.dumps({
"success": False,
"reason": "Parameter {parameter} has an issue",
"exception": f"Value Check Error: {check}",
})
# Custom format for ${name[0,1,2,...]}$
#submatch = "([${]{2}([0-9a-zA-Z_-]+)(\[.*\])[}$]{2})"
@@ -2726,8 +2735,11 @@ class AppBase:
except KeyError:
break
else:
raise e
#break
raise json.dumps({
"success": False,
"reason": "You may be running an old version of this action. Please delete and remake the node.",
"exception": f"TypeError: {e}",
})
# Forcing async wait in case of old apps that use async
try:
+1 -2
View File
@@ -18,7 +18,7 @@ docker push ghcr.io/frikky/$NAME:$VERSION
docker push ghcr.io/frikky/$NAME:nightly
docker push ghcr.io/frikky/$NAME:latest
#### BLACKARCH ###
#### KALI ###
NAME=shuffle-app_sdk_kali
docker build . -f Dockerfile_kali -t frikky/shuffle:app_sdk_kali -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
@@ -33,4 +33,3 @@ docker build . -f Dockerfile_blackarch -t frikky/shuffle:app_sdk_blackarch -t fr
docker push frikky/shuffle:app_sdk_blackarch
docker push ghcr.io/frikky/$NAME:$VERSION
docker push ghcr.io/frikky/$NAME:nightly
+2
View File
@@ -5810,8 +5810,10 @@ func initHandlers() {
// Triggers
r.HandleFunc("/api/v1/hooks/new", shuffle.HandleNewHook).Methods("POST", "OPTIONS")
r.HandleFunc("/api/v1/hooks", shuffle.HandleNewHook).Methods("POST", "OPTIONS")
r.HandleFunc("/api/v1/hooks/{key}", handleWebhookCallback).Methods("POST", "GET", "PATCH", "PUT", "DELETE", "OPTIONS")
r.HandleFunc("/api/v1/hooks/{key}/delete", shuffle.HandleDeleteHook).Methods("DELETE", "OPTIONS")
r.HandleFunc("/api/v1/hooks/{key}", shuffle.HandleDeleteHook).Methods("DELETE", "OPTIONS")
// OpenAPI configuration
r.HandleFunc("/api/v1/verify_swagger", verifySwagger).Methods("POST", "OPTIONS")