#400: Fixed additional issues with JSON keys. NOT in public testing yet, as this may be breaking changes for JSON
This commit is contained in:
@@ -1052,14 +1052,15 @@ const Admin = (props) => {
|
||||
})
|
||||
.then((responseJson) => {
|
||||
//console.log("RESP: ", responseJson)
|
||||
if (responseJson.success) {
|
||||
if (responseJson.success === true) {
|
||||
handleFileUpload(responseJson.id, file);
|
||||
} else {
|
||||
alert.error("Failed to upload file ", filename);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
alert.error(error.toString());
|
||||
alert.error("Failed to upload file ", filename)
|
||||
console.log(error.toString());
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -3168,7 +3168,7 @@ const AppCreator = (defaultprops) => {
|
||||
style={{ flex: "1", marginRight: "15px", backgroundColor: inputColor }}
|
||||
fullWidth={true}
|
||||
placeholder={
|
||||
'{\n\t"username": "${username}",\n\t"apikey": "${apikey}",\n\t"search": "1.2.3.5"}'
|
||||
'{\n\t"example": "${example}",\n\t"apikey": "${apikey}",\n\t"search": "1.2.3.5"\n}'
|
||||
}
|
||||
margin="normal"
|
||||
variant="outlined"
|
||||
|
||||
@@ -1299,31 +1299,32 @@ const Workflows = (props) => {
|
||||
body: JSON.stringify(data),
|
||||
credentials: "include",
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for workflow publish :O!");
|
||||
} else {
|
||||
if (isCloud) {
|
||||
alert.success("Successfully published workflow");
|
||||
} else {
|
||||
alert.success(
|
||||
"Successfully published workflow to https://shuffler.io"
|
||||
);
|
||||
}
|
||||
}
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for workflow publish :O!");
|
||||
} else {
|
||||
if (isCloud) {
|
||||
alert.success("Successfully published workflow");
|
||||
} else {
|
||||
alert.success(
|
||||
"Successfully published workflow to https://shuffler.io"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return response.json();
|
||||
})
|
||||
.then((responseJson) => {
|
||||
if (responseJson.reason !== undefined) {
|
||||
alert.error("Failed publishing: ", responseJson.reason);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((responseJson) => {
|
||||
if (responseJson.reason !== undefined) {
|
||||
alert.error("Failed publishing: ", responseJson.reason);
|
||||
}
|
||||
|
||||
getAvailableWorkflows();
|
||||
})
|
||||
.catch((error) => {
|
||||
alert.error(error.toString());
|
||||
});
|
||||
getAvailableWorkflows();
|
||||
})
|
||||
.catch((error) => {
|
||||
alert.error("Failed publishing: is the workflow valid? Remember to save the workflow first.")
|
||||
console.log(error.toString());
|
||||
});
|
||||
};
|
||||
|
||||
const copyWorkflow = (data) => {
|
||||
|
||||
Reference in New Issue
Block a user