Browse Source

bug fix

master
Hitesh 5 years ago
parent
commit
52d8943ac6
  1. 1
      AUTHORS
  2. 2
      lib/index.js
  3. 3
      package.json

1
AUTHORS

@ -1,2 +1,3 @@
AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/) AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)
Nyaundi Brian <danleyb2@gmail.com> (https://danleyb2.online/) Nyaundi Brian <danleyb2@gmail.com> (https://danleyb2.online/)
Hitesh Walia <hiteshwar.walia@gmail.com>

2
lib/index.js

@ -123,6 +123,7 @@ module.exports.create = function(config) {
headers: { Authorization: auth }, headers: { Authorization: auth },
json: data || true json: data || true
}; };
return request(req).then(function(resp) { return request(req).then(function(resp) {
if (resp.statusCode < 200 || resp.statusCode >= 300) { if (resp.statusCode < 200 || resp.statusCode >= 300) {
req.headers.Authorization = redacted; req.headers.Authorization = redacted;
@ -148,6 +149,7 @@ module.exports.create = function(config) {
'. Check subdomain, api key, etc' '. Check subdomain, api key, etc'
); );
} }
return resp;
}); });
} }
}; };

3
package.json

@ -20,7 +20,8 @@
], ],
"author": "Nyaundi Brian <danleyb2@gmail.com> (https://danleyb2.online/)", "author": "Nyaundi Brian <danleyb2@gmail.com> (https://danleyb2.online/)",
"contributors": [ "contributors": [
"AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)" "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
"Hitesh Walia <hiteshwar.walia@gmail.com>"
], ],
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": {}, "dependencies": {},

Loading…
Cancel
Save