Skip to content

Instantly share code, notes, and snippets.

@ahmadwaliesipick
Created May 31, 2018 18:50
Show Gist options
  • Save ahmadwaliesipick/563b35c7ab5f416d2630768348a74af8 to your computer and use it in GitHub Desktop.
Save ahmadwaliesipick/563b35c7ab5f416d2630768348a74af8 to your computer and use it in GitHub Desktop.
exports.getSavedMap = function(req, res) {
var userName = req.params.userName;
MapDrawing.find({
userName: userName,
trekName: {
$exists: true
},
'features.0': {
$exists: true
}
}, function(err, mapDraw) {
if (err) {
return res.status(500).json({
err: err
});
}
return res.status(200).json({
mapDrawInfo: mapDraw
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment