Merge pull request #1729 from marcemarc/marcemarc-U4-9480

U4-9489 - dictonaryToQueryString only returns first dictionary item
This commit is contained in:
Shannon Deminick
2017-05-31 15:17:11 +02:00
committed by GitHub
2 changed files with 8 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ function logResource($q, $http, umbRequestHelper) {
"logApiBaseUrl",
"GetCurrentUserLog",
[{ logtype: type, sinceDate: since }])),
'Failed to retrieve user data for id ' + id);
'Failed to retrieve log data for current user of type ' + type + ' since ' + since);
},
/**
@@ -99,7 +99,7 @@ function logResource($q, $http, umbRequestHelper) {
"logApiBaseUrl",
"GetLog",
[{ logtype: type, sinceDate: since }])),
'Failed to retrieve user data for id ' + id);
'Failed to retrieve log data of type ' + type + ' since ' + since);
}
};
}

View File

@@ -47,15 +47,17 @@ function umbRequestHelper($http, $q, umbDataFormatter, angularHelper, dialogServ
return _.map(queryStrings, function (item) {
var key = null;
var val = null;
var encodedQueryStrings = [];
// can be multiple parameters passed via array
for (var k in item) {
key = k;
val = item[k];
break;
}
encodedQueryStrings.push(encodeURIComponent(key) + "=" + encodeURIComponent(val));
}
if (key === null || val === null) {
throw "The object in the array was not formatted as a key/value pair";
}
return encodeURIComponent(key) + "=" + encodeURIComponent(val);
}
return encodedQueryStrings.join("&");
}).join("&");
}
else if (angular.isObject(queryStrings)) {