Browse Source

Add hasOwnProperty checks to ApiSvc

pull/11/head
Jack Foltz 6 years ago
parent
commit
9e36c3c244
Signed by: foltik <jack@foltz.io> GPG Key ID: 303F88F996E95541
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      app/public/services/ApiSvc.js

+ 4
- 2
app/public/services/ApiSvc.js View File

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


Loading…
Cancel
Save