mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
|
@ -1,10 +1,10 @@
|
|||
const constants = require('../initializers/constants')
|
||||
import { PAGINATION_COUNT_DEFAULT } from '../initializers'
|
||||
|
||||
function setPagination (req, res, next) {
|
||||
if (!req.query.start) req.query.start = 0
|
||||
else req.query.start = parseInt(req.query.start, 10)
|
||||
|
||||
if (!req.query.count) req.query.count = constants.PAGINATION_COUNT_DEFAULT
|
||||
if (!req.query.count) req.query.count = PAGINATION_COUNT_DEFAULT
|
||||
else req.query.count = parseInt(req.query.count, 10)
|
||||
|
||||
return next()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue