Closed seanmavley closed 8 years ago
I couldn't spot any function available in the package that retrieves all the stops available.
I added this to the gtfs package:
// Copied and tweaked the agencies // function getAllStops: function(cb) { Stop.find({}, cb); },
Then tried using it as:
var all_stops; router.get('/stops', function(req, res) { gtfs.getAllStops(function(err, data) { if (!err) { all_stops = data; console.log(all_stops); } else { console.log(err); } }) res.json({ stops: all_stops }); })
I get an empty response from the query. All the other queries worked as usual though
Okay, what I rolled out seems to be working now. No idea why it wasn't at first.
I couldn't spot any function available in the package that retrieves all the stops available.
I added this to the gtfs package:
Then tried using it as:
I get an empty response from the query. All the other queries worked as usual though