From: Chocobozzz Date: Wed, 6 Jul 2016 17:57:47 +0000 (+0200) Subject: Server: fix videos pagination X-Git-Tag: v0.0.1-alpha~837 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4fea95df04738290232bdc51696fb2233aa1a65e;p=oweals%2Fpeertube.git Server: fix videos pagination --- 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)