Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ Resource.prototype.load = function(fn){
// TODO: ideally we should next() passed the
// route handler
if (null == obj) return res.send(404);
req[id] = obj;
if (id=="user") {
req["requested"+lingo.capitalize(id)] = obj;
} else {
req[id] = obj;
};
next();
};

// Maintain backward compatibility
if (2 == fn.length) {
fn(req.params[id], callback);
Expand Down