From e84e15a92cc23643edd37df7d81d67aacd0ece5b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 25 Jun 2018 16:45:26 +0200 Subject: [PATCH] call res just once * closes #4 --- webtask-zoho.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webtask-zoho.js b/webtask-zoho.js index 8cc0f77..19c6796 100644 --- a/webtask-zoho.js +++ b/webtask-zoho.js @@ -31,7 +31,6 @@ const sendRequest = (options, res) => { // just pass through whatever we get from the APIs // as the response res.send(body) - res.sendStatus(response.statusCode) }) } @@ -58,7 +57,7 @@ server.get('/crm/:data', (req, res) => { const { data } = req.params const options = { - url: `${apiUrlZohoCRM}Leads`, // eslint-disable-line max-len + url: `${apiUrlZohoCRM}Leads`, headers: { 'Authorization': `Zoho-oauthtoken ${ZOHO_CRM_TOKEN}` }, method: 'POST', formData: data