diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-08-16 21:51:04 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-08-16 21:51:04 +0200 |
commit | 0ff21c1c086f907612e34880f76f08bc74eeb78c (patch) | |
tree | 30da1520f5c9ba451158d0db1d22416ea49e0560 /server/controllers/api/v1/videos.js | |
parent | 7eef95353f9202e1f3285606282fc8fd904c90ef (diff) | |
download | PeerTube-0ff21c1c086f907612e34880f76f08bc74eeb78c.tar.gz PeerTube-0ff21c1c086f907612e34880f76f08bc74eeb78c.tar.zst PeerTube-0ff21c1c086f907612e34880f76f08bc74eeb78c.zip |
Server: video.list -> video.listForApi (with pagination, sort...)
Diffstat (limited to 'server/controllers/api/v1/videos.js')
-rw-r--r-- | server/controllers/api/v1/videos.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/api/v1/videos.js b/server/controllers/api/v1/videos.js index 1f939b077..0a441f146 100644 --- a/server/controllers/api/v1/videos.js +++ b/server/controllers/api/v1/videos.js | |||
@@ -142,7 +142,7 @@ function getVideo (req, res, next) { | |||
142 | } | 142 | } |
143 | 143 | ||
144 | function listVideos (req, res, next) { | 144 | function listVideos (req, res, next) { |
145 | Video.list(req.query.start, req.query.count, req.query.sort, function (err, videosList, videosTotal) { | 145 | Video.listForApi(req.query.start, req.query.count, req.query.sort, function (err, videosList, videosTotal) { |
146 | if (err) return next(err) | 146 | if (err) return next(err) |
147 | 147 | ||
148 | res.json(getFormatedVideos(videosList, videosTotal)) | 148 | res.json(getFormatedVideos(videosList, videosTotal)) |