Fixed issues with string and json parsing in SDK

This commit is contained in:
frikky
2021-04-02 21:57:02 +02:00
parent ab5c0d82b9
commit 63db013438
10 changed files with 177 additions and 58 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ module shuffle
go 1.13
//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
require (
+3 -1
View File
@@ -5140,12 +5140,13 @@ func runInit(ctx context.Context) {
// Gets environments and inits if it doesn't exist
count, err := getEnvironmentCount()
if count == 0 && err == nil && len(activeOrgs) == 1 {
log.Printf("Setting up environment with org %s", activeOrgs[0].Id)
log.Printf("[INFO] Setting up environment with org %s", activeOrgs[0].Id)
item := shuffle.Environment{
Name: "Shuffle",
Type: "onprem",
OrgId: activeOrgs[0].Id,
Default: true,
Id: uuid.NewV4().String(),
}
err = setEnvironment(ctx, &item)
@@ -5889,6 +5890,7 @@ func handleCloudSetup(resp http.ResponseWriter, request *http.Request) {
Registered: true,
Default: false,
OrgId: org.Id,
Id: uuid.NewV4().String(),
}
err = setEnvironment(ctx, &newEnv)
+1 -1
View File
@@ -1058,7 +1058,7 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
}
if workflowExecution.Status == "FINISHED" {
log.Printf("Workflowexecution is already FINISHED. No further action can be taken")
log.Printf("[INFO] Workflowexecution is already FINISHED. No further action can be taken.")
resp.WriteHeader(401)
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Workflowexecution is already finished because of %s with status %s"}`, workflowExecution.LastNode, workflowExecution.Status)))
return