Since the from property is doing this from: (pageNum - 1) * perPage, logic, I think the default for pageNum should be 1. Otherwise it would results it -15 when pageNum and perPage are defaults.

This commit is contained in:
Brian Woodward
2014-05-06 12:05:25 -07:00
committed by Spencer Alger
parent c793360d9c
commit 9fdc3e8982

View File

@ -112,7 +112,7 @@ NOTE: In this example, `request` and `response` are http://expressjs.com/api.htm
[source,js]
-----------------
var pageNum = request.param('page', 0);
var pageNum = request.param('page', 1);
var perPage = request.param('per_page', 15);
var userQuery = request.param('search_query');
var userId = request.session.userId;