load function doesn't add to req object on index route #68

Open
blairvanderhoof opened this Issue Nov 30, 2012 · 2 comments

Comments

Projects
None yet
3 participants

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.

guo-yu commented Oct 31, 2013

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment