From 4b696da0334a92a00119ab4a5c0414a79f39da4f Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Fri, 15 Mar 2019 12:51:25 -0400 Subject: updated mobile form, updated web schemas, and /mobilerequest handler. No front end web changes yet --- web/routes/index.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'web/routes') diff --git a/web/routes/index.js b/web/routes/index.js index b2ba91f..a93db3b 100644 --- a/web/routes/index.js +++ b/web/routes/index.js @@ -23,14 +23,8 @@ router.get('/map', function(req,res) { }); router.post('/mobilerequest', function(req, res) { - var data = { - 'coordinates': req.body.coordinates, - 'type': req.body.type, - 'isInjured': req.body.isInjured, - 'reasonForHelp': req.body.reasonForHelp, - 'ageRange': req.body.ageRange, - 'clothingDescription': req.body.clothingDescription - } + console.log(req.body); + var data = req.body; Points.save_request(data, function(err, result) { if (err) { console.log(`err inserting mobile request into db: ${err}`); @@ -44,7 +38,7 @@ router.post('/mobilerequest', function(req, res) { res.status(200).send({'status': 'success', 'data': data}); } }); - + }); -- cgit v1.2.3 From bf2b97832c3746e3f7f18c6aec253c76124e5564 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Fri, 15 Mar 2019 17:22:56 -0400 Subject: added FE web updates for displaying new form report. minor ui enchancements --- web/routes/index.js | 1 - 1 file changed, 1 deletion(-) (limited to 'web/routes') diff --git a/web/routes/index.js b/web/routes/index.js index a93db3b..23fcf36 100644 --- a/web/routes/index.js +++ b/web/routes/index.js @@ -23,7 +23,6 @@ router.get('/map', function(req,res) { }); router.post('/mobilerequest', function(req, res) { - console.log(req.body); var data = req.body; Points.save_request(data, function(err, result) { if (err) { -- cgit v1.2.3