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){