aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2016-09-22 11:17:31 -0700
committerAdam Soltys <[email protected]>2016-09-22 11:17:36 -0700
commitcba0278cc681a10cb528ed16cfe500c9f20fc7a2 (patch)
treec6e2cccdd0554b28b376d98ff6e436adbb125306 /routes
parent6e2c7a4128c05f038142707db912cd247a011694 (diff)
downloadcoinos-server-cba0278cc681a10cb528ed16cfe500c9f20fc7a2.tar.gz
coinos-server-cba0278cc681a10cb528ed16cfe500c9f20fc7a2.zip
Provide callback to sendgrid API function
Diffstat (limited to 'routes')
-rw-r--r--routes/transactions.js6
-rw-r--r--routes/users.js12
2 files changed, 15 insertions, 3 deletions
diff --git a/routes/transactions.js b/routes/transactions.js
index d132e418..8737a2c3 100644
--- a/routes/transactions.js
+++ b/routes/transactions.js
@@ -83,7 +83,11 @@
path: '/v3/mail/send',
body: mail.toJSON()
});
- return sg.API(request);
+ return sg.API(request, function(error, response) {
+ console.log(response.statusCode);
+ console.log(response.body);
+ return console.log(response.headers);
+ });
});
});
res.write(JSON.stringify(req.body));
diff --git a/routes/users.js b/routes/users.js
index 2c79cb31..eddd928c 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -167,7 +167,11 @@
path: '/v3/mail/send',
body: mail.toJSON()
});
- return sg.API(request);
+ return sg.API(request, function(error, response) {
+ console.log(response.statusCode);
+ console.log(response.body);
+ return console.log(response.headers);
+ });
});
});
});
@@ -250,7 +254,11 @@
path: '/v3/mail/send',
body: mail.toJSON()
});
- return sg.API(request);
+ return sg.API(request, function(error, response) {
+ console.log(response.statusCode);
+ console.log(response.body);
+ return console.log(response.headers);
+ });
});
}
},