aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-07-06 19:57:47 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-07-06 19:57:47 +0200
commit4fea95df04738290232bdc51696fb2233aa1a65e (patch)
tree519aa389ee9c18ce41452cd7ef7601d8f48317f5 /server
parentefb9afc3e8b031c5dde532e3616caac2313e670a (diff)
downloadPeerTube-4fea95df04738290232bdc51696fb2233aa1a65e.tar.gz
PeerTube-4fea95df04738290232bdc51696fb2233aa1a65e.tar.zst
PeerTube-4fea95df04738290232bdc51696fb2233aa1a65e.zip
Server: fix videos pagination
Diffstat (limited to 'server')
-rw-r--r--server/models/video.js2
1 files changed, 1 insertions, 1 deletions
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) {
248 248
249 async.parallel([ 249 async.parallel([
250 function (asyncCallback) { 250 function (asyncCallback) {
251 self.find(query).skip(start).limit(start + count).sort(sort).exec(asyncCallback) 251 self.find(query).skip(start).limit(count).sort(sort).exec(asyncCallback)
252 }, 252 },
253 function (asyncCallback) { 253 function (asyncCallback) {
254 self.count(query, asyncCallback) 254 self.count(query, asyncCallback)