From 4fea95df04738290232bdc51696fb2233aa1a65e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Jul 2016 19:57:47 +0200 Subject: Server: fix videos pagination --- server/models/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/video.js b/server/models/video.js index 1c06e477c..8054caa77 100644 --- a/server/models/video.js +++ b/server/models/video.js @@ -248,7 +248,7 @@ function findWithCount (query, start, count, sort, callback) { async.parallel([ function (asyncCallback) { - self.find(query).skip(start).limit(start + count).sort(sort).exec(asyncCallback) + self.find(query).skip(start).limit(count).sort(sort).exec(asyncCallback) }, function (asyncCallback) { self.count(query, asyncCallback) -- cgit v1.2.3