From 5c39adb7313e0696aabb4b71196ab7b0b378c359 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Aug 2016 22:31:45 +0200 Subject: Server: add user list sort/pagination --- server/models/video.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/video.js') diff --git a/server/models/video.js b/server/models/video.js index a5540d127..63afc2efe 100644 --- a/server/models/video.js +++ b/server/models/video.js @@ -197,7 +197,7 @@ function getDurationFromFile (videoPath, callback) { function listForApi (start, count, sort, callback) { const query = {} - return modelUtils.findWithCount.call(this, query, start, count, sort, callback) + return modelUtils.listForApiWithCount.call(this, query, start, count, sort, callback) } function listByUrlAndMagnet (fromUrl, magnetUri, callback) { @@ -234,7 +234,7 @@ function search (value, field, start, count, sort, callback) { query[field] = new RegExp(value) } - modelUtils.findWithCount.call(this, query, start, count, sort, callback) + modelUtils.listForApiWithCount.call(this, query, start, count, sort, callback) } function seedAllExisting (callback) { -- cgit v1.2.3