From ef4231b70a73aea92c85fdc41feb76ed45da10f1 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Wed, 19 Apr 2017 14:34:22 +0300 Subject: [PATCH] Remove JSON.parse() around response bodies in contact-importer --- lib/helpers/contact-importer/contact-importer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/helpers/contact-importer/contact-importer.js b/lib/helpers/contact-importer/contact-importer.js index eb5778b78..ef5b10fdb 100644 --- a/lib/helpers/contact-importer/contact-importer.js +++ b/lib/helpers/contact-importer/contact-importer.js @@ -41,9 +41,9 @@ var ContactImporter = module.exports = function(sg, options) { owner: self, }, function(error, result) { if (error) { - return self._notify(error, JSON.parse(error.response.body), batch); + return self._notify(error, error.response.body, batch); } - return self._notify(null, JSON.parse(result.body), batch); + return self._notify(null, result.body, batch); }); } }; @@ -79,9 +79,9 @@ ContactImporter.prototype.push = function(data) { owner: self, }, function(error, result) { if (error) { - return self._notify(error, JSON.parse(error.response.body), batch); + return self._notify(error, error.response.body, batch); } - return self._notify(null, JSON.parse(result.body), batch); + return self._notify(null, result.body, batch); }); } // Otherwise, it store it for later.