From 663759f56b2521352b3e3cb07ac4713349617c0e Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 21 Apr 2019 01:36:51 -0700 Subject: [PATCH] fixes for adding email for landing page --- app/controllers/user.controller.js | 5 +---- app/routes/public.route.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/user.controller.js b/app/controllers/user.controller.js index 582bb38..5206639 100644 --- a/app/controllers/user.controller.js +++ b/app/controllers/user.controller.js @@ -19,10 +19,7 @@ exports.addEmail = (req, res, next) => { }) .then(donor => { // Send created user to client - return res.status(201).json({ - message: 'User created', - donor - }); + return res.status(201).json(donor); }) .catch(error => next(error)); } diff --git a/app/routes/public.route.js b/app/routes/public.route.js index 2b3ed5e..998e991 100644 --- a/app/routes/public.route.js +++ b/app/routes/public.route.js @@ -33,7 +33,7 @@ router.get( router.get('/organizations/:search', organization.searchOrganizations); // Add user email to database from the landing page -router.post('/users/landing', user.addEmail); +router.post('/landing/email', user.addEmail); // Test sending an email router.post('/email/test', sendgrid.testEmail);