diff options
| author | Kumar Damani <damani.kumar@gmail.com> | 2019-03-20 21:39:50 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-20 21:39:50 +0000 |
| commit | 7c98e3c782f3d8da4cc289dce9ecb0a6cfd9b26d (patch) | |
| tree | 60c31b4ce78beee9ab7c2ee9142e9718308c3cfa /web/routes/index.js | |
| parent | 672e6f2a3bb27b6e3f3d4cff3425cfc653e07be6 (diff) | |
| parent | 7cbb77be44854015b943d5a2147fe188bd0132f1 (diff) | |
Merge pull request #42 from csc301-winter-2019/feat/32
Feat/32
Diffstat (limited to 'web/routes/index.js')
| -rw-r--r-- | web/routes/index.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/web/routes/index.js b/web/routes/index.js index b2ba91f..23fcf36 100644 --- a/web/routes/index.js +++ b/web/routes/index.js @@ -23,14 +23,7 @@ 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 - } + var data = req.body; Points.save_request(data, function(err, result) { if (err) { console.log(`err inserting mobile request into db: ${err}`); @@ -44,7 +37,7 @@ router.post('/mobilerequest', function(req, res) { res.status(200).send({'status': 'success', 'data': data}); } }); - + }); |
