summaryrefslogtreecommitdiffstats
path: root/gui-editors
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2021-10-29 14:25:39 +0000
committerGerrit Code Review <gerrit@onap.org>2021-10-29 14:25:39 +0000
commitcdd17d8ce7c1ec139fb8ef0685d5b8961e93661d (patch)
tree07f0b0efc372cd1a8c0cf0ce3a6333267bc59ee6 /gui-editors
parent6df019389c1f5de9dd5b7601e270f0ef17ea2491 (diff)
parent08b6e0e63e4524d02507d6709710b53f87690cc0 (diff)
Merge "Add user id only when it was provided"
Diffstat (limited to 'gui-editors')
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
index a002788..de9edf3 100644
--- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
@@ -58,10 +58,13 @@ function files_fileDownload() {
}
function files_fileUpload() {
- var requestURL = window.restRootURL + "/Model/Upload?userId=" + new URLSearchParams(window.location.search).get('userId');
-
+ let requestURL = window.restRootURL + "/Model/Upload";
+ const userId = new URLSearchParams(window.location.search).get('userId');
+ if (userId) {
+ requestURL = requestURL + "?userId=" + userId;
+ }
ajax_getOKOrFail(requestURL, function(data) {
- var uploadResultString = "";
+ let uploadResultString = "";
for (let value of data.messages.message) {
uploadResultString += (value + "\n");
}