From 384715256c4b81107e8e6b20223786c3320c18d0 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 23 Aug 2016 15:24:06 -0400 Subject: [PATCH] show route --- controllers/runs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controllers/runs.js b/controllers/runs.js index 787b1d4..c0180e6 100644 --- a/controllers/runs.js +++ b/controllers/runs.js @@ -10,7 +10,13 @@ controller.get('/', function(req, res){ }); controller.get('/:id', function(req, res){ - res.json(runs[req.params.id]); + // Run.findOne({ + // where:{ + // id:req.params.id + // } + Run.findById(req.params.id).then(function(foundRuns){ + res.json(foundRuns); + }); }); controller.post('/', function(req, res){