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:
parent
9fd540562c
commit
8a02bd0433
19 changed files with 232 additions and 94 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue