express-resource
express-resource copied to clipboard
load function doesn't add to req object on index route
When does the load function actually add to the request object? For the show route it adds fine, but for index, the property for the singular named route is not there.
did you mean:
var index = require('./index');
app.resource(index).load(function(req,id,next){
next(null,'demoData');
})
check req.id
in index router, in this case above, req.id
will be 'demoData'
I have the same question, the auto-loader seems to fire for routes except index, is this intentional?