aboutsummaryrefslogtreecommitdiff
path: root/web/routes/index.js
diff options
context:
space:
mode:
authorKumar Damani <damani.kumar@gmail.com>2019-03-19 20:32:59 +0000
committerGitHub <noreply@github.com>2019-03-19 20:32:59 +0000
commitf96b95e742582011e6db6c78f4e4274c0720888d (patch)
treed73e821010f8e3bc664a97b89b8584e92e0ab6b5 /web/routes/index.js
parent84aee4a2ed8e79f506f5c0928dacdfd313776d0f (diff)
parent5d7cb45633994c3d51a54e525d7f9eba685b12ed (diff)
Merge pull request #39 from csc301-winter-2019/feat/32
Feat/32
Diffstat (limited to 'web/routes/index.js')
-rw-r--r--web/routes/index.js11
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});
}
});
-
+
});