I’m doing the exercise tracker project and I don’t know how to implement this feature:
GET users’s exercise log: GET /api/exercise/log?{userId}[&from][&to][&limit]
Normally with express I could do:
app.get(’/api/exercise/:id’, function(req, res) {
User.find({_id: req.params.id}, function(err, result) {
//code goes here
});
});
But I don’t understand how log?{userId}[&from][&to][&limit] is implemented. Please explain what I’m supposed to do.