diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index be7a8088..627696e7 100644 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -113,8 +113,8 @@ const AuthenticationOauth2 = (props) => { var resources = ""; if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) { - //scopes.push("offline_access") - resources = scopes.join(","); + resources = scopes.join(" "); + //resources = scopes.join(","); } const authentication_url = authenticationType.token_uri; diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 1c465095..1ed01c7b 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -3143,7 +3143,7 @@ const AngularWorkflow = (defaultprops) => { copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ document.execCommand("copy"); - alert.success(`Copied ${cydata.length} elements`); + alert.success(`Copied ${cydata.length} element(s)`); } } } diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index 70441a07..7afaad07 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -322,7 +322,7 @@ const AppCreator = (defaultprops) => { const [currentActionMethod, setCurrentActionMethod] = useState( actionNonBodyRequest[0] - ); + ) const [currentAction, setCurrentAction] = useState({ name: "", file_field: "", @@ -1551,6 +1551,7 @@ const AppCreator = (defaultprops) => { }; // Saving the app that's been configured. + // Save SAVE app const submitApp = () => { alert.info("Uploading and building app " + name); setAppBuilding(true); @@ -1608,8 +1609,9 @@ const AppCreator = (defaultprops) => { } // Handles actions + var handledPaths = [] for (var key in actions) { - var item = actions[key]; + var item = JSON.parse(JSON.stringify(actions[key])) if (item.errors.length > 0) { alert.error("Saving with error in action " + item.name); } @@ -1618,6 +1620,27 @@ const AppCreator = (defaultprops) => { item.name = item.description; } + // Basic way to allow multiple of the same path + var pathjoin = item.url+"_"+item.method.toLowerCase() + if (handledPaths.includes(pathjoin)) { + console.log("ALREADY INCLUDED: ", pathjoin) + + // Max 100 of same lol + for (var i = 0; i < 100; i++) { + item.url = item.url+"_shuffle_replace_"+i + + pathjoin = item.url+"_"+item.method.toLowerCase() + if (handledPaths.includes(pathjoin)) { + continue + } + + console.log("FOUND NEW: ", item.url) + break + } + } + + handledPaths.push(pathjoin) + if (data.paths[item.url] === null || data.paths[item.url] === undefined) { data.paths[item.url] = {}; }