1
0
mirror of https://github.com/Foltik/Shimapan synced 2025-02-25 16:50:35 -05:00

Add hasOwnProperty checks to ApiSvc

This commit is contained in:
Jack Foltz 2018-01-14 09:50:54 -05:00
parent 8b06a715cd
commit 9e36c3c244
Signed by: foltik
GPG Key ID: 303F88F996E95541

View File

@ -28,6 +28,7 @@ angular.module('ApiSvc', []).service('ApiService', ['$http', function ($http) {
transformRequest: function (obj) { transformRequest: function (obj) {
var str = []; var str = [];
for (var p in obj) for (var p in obj)
if (obj.hasOwnProperty(p))
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&"); return str.join("&");
}, },
@ -45,6 +46,7 @@ angular.module('ApiSvc', []).service('ApiService', ['$http', function ($http) {
transformRequest: function (obj) { transformRequest: function (obj) {
var str = []; var str = [];
for (var p in obj) for (var p in obj)
if (obj.hasOwnProperty(p))
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&"); return str.join("&");
}, },