1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add pod list endpoint with pagination, sort...

This commit is contained in:
Chocobozzz 2017-10-19 09:43:01 +02:00
parent 9fd540562c
commit 8a02bd0433
No known key found for this signature in database
GPG key ID: 583A612D890159BE
19 changed files with 232 additions and 94 deletions

View file

@ -4,6 +4,12 @@ import * as express from 'express'
import { SortType } from '../helpers'
import { database } from '../initializers'
function setPodsSort (req: express.Request, res: express.Response, next: express.NextFunction) {
if (!req.query.sort) req.query.sort = '-createdAt'
return next()
}
function setUsersSort (req: express.Request, res: express.Response, next: express.NextFunction) {
if (!req.query.sort) req.query.sort = '-createdAt'
@ -46,6 +52,7 @@ function setBlacklistSort (req: express.Request, res: express.Response, next: ex
// ---------------------------------------------------------------------------
export {
setPodsSort,
setUsersSort,
setVideoAbusesSort,
setVideosSort,