Skip to content

Commit

Permalink
fixing example in documentation to use req rather than res
Browse files Browse the repository at this point in the history
  • Loading branch information
acarl committed Sep 30, 2017
1 parent 164c21a commit 69c46aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ hooks.addPreHookForAllResources('get', function(req, res, dbClient, next) {
// Will generate query with {read: 0}
hooks.addPreHookForAllResources('getList', function(req, res, dbClient, next){

res.pgRestifyWhere = {};
req.pgRestifyWhere = {};
for (key in req.query){
switch (key){
case 'pageSize':
Expand All @@ -268,7 +268,7 @@ hooks.addPreHookForAllResources('getList', function(req, res, dbClient, next){
case 'orderByDesc':
break;
default:
res.pgRestifyWhere[key] = req.query[key];
req.pgRestifyWhere[key] = req.query[key];
}
}
return next();
Expand Down

0 comments on commit 69c46aa

Please sign in to comment.