Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Nov 30, 2012 · 2 comments
Open

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

ghost opened this issue Nov 30, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 30, 2012

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
Copy link

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'

@mandyscott
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants