diff --git a/CloudVM/CloudVM.js b/CloudVM/CloudVM.js index 0f16c24cc..fdd5379db 100644 --- a/CloudVM/CloudVM.js +++ b/CloudVM/CloudVM.js @@ -101,7 +101,8 @@ function newCloudVM() { console.log("CloudVM -> Bot code changes detected."); - let path = "AABrowserAPI" + "/" + let path = window.canvasApp.urlPrefix + + "AABrowserAPI" + "/" + "saveBotCode" + "/" + window.DEV_TEAM + "/" + "members" + "/" diff --git a/ProductCard.js b/ProductCard.js index 7b741482a..0d0b8d389 100644 --- a/ProductCard.js +++ b/ProductCard.js @@ -186,8 +186,6 @@ Here we will download the images still at the legacy storage. */ - const WEB_URL = "https://develop.advancedalgos.net"; - legacyTeamAvatar = new Image(); legacyTeamAvatar.onload = onLegacyImageLoad; @@ -197,7 +195,7 @@ imageLoaded(); } - legacyTeamAvatar.src = WEB_URL + "/Images/" + LEGACY_TEAM + "/" + LEGACY_TEAM + ".png"; + legacyTeamAvatar.src = window.canvasApp.urlPrefix + "Images/" + LEGACY_TEAM + "/" + LEGACY_TEAM + ".png"; legacyBotAvatar = new Image(); legacyBotAvatar.onload = onLegacyImageLoadBot; @@ -207,7 +205,7 @@ thisObject.bot.avatar = legacyBotAvatar; } - legacyBotAvatar.src = WEB_URL + "/Images/" + LEGACY_TEAM + "/" + REPO + "/" + PROFILE_PIC; + legacyBotAvatar.src = window.canvasApp.urlPrefix + "Images/" + LEGACY_TEAM + "/" + REPO + "/" + PROFILE_PIC; const PLOTTER_TEAM = thisObject.product.plotter.devTeam ; const PLOTTER_REPO = thisObject.product.plotter.codeName; @@ -221,7 +219,7 @@ imageLoaded(); } - legacyPlotterBanner.src = WEB_URL + "/Images/" + PLOTTER_TEAM + "/" + PLOTTER_REPO + "/" + PLOTTER_PROFILE_PIC; + legacyPlotterBanner.src = window.canvasApp.urlPrefix + "Images/" + PLOTTER_TEAM + "/" + PLOTTER_REPO + "/" + PLOTTER_PROFILE_PIC; /* Here we will download the images of teams uploaded at the Teams Module. diff --git a/Scripts/AppPreLoader.js b/Scripts/AppPreLoader.js index 2452bfeef..7faa9c053 100644 --- a/Scripts/AppPreLoader.js +++ b/Scripts/AppPreLoader.js @@ -122,10 +122,17 @@ function callServer(pContentToSend, pPath, callBackFunction) { } else { - let blob = new Blob([pContentToSend], { type: 'text/plain' }); + try { - xhttp.open("POST", pPath, true); - xhttp.send(blob); + let blob = new Blob([pContentToSend], { type: 'text/plain' }); + xhttp.open("POST", pPath, true); + xhttp.send(blob); + + } catch (err) { + + if (ERROR_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[ERROR] callServer -> err.message = " & err.message); } + + } } }