Server: fix remote videos requests validator
This commit is contained in:
parent
4613274479
commit
6c1a098b41
|
@ -22,7 +22,8 @@ const videosValidators = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isEachRemoteVideosValid (requests) {
|
function isEachRemoteVideosValid (requests) {
|
||||||
return requests.every(function (request) {
|
return miscValidators.isArray(requests) &&
|
||||||
|
requests.every(function (request) {
|
||||||
const video = request.data
|
const video = request.data
|
||||||
return (
|
return (
|
||||||
isRequestTypeAddValid(request.type) &&
|
isRequestTypeAddValid(request.type) &&
|
||||||
|
|
|
@ -19,7 +19,6 @@ function dataToDecrypt (req, res, next) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function remoteVideos (req, res, next) {
|
function remoteVideos (req, res, next) {
|
||||||
req.checkBody('data').isArray()
|
|
||||||
req.checkBody('data').isEachRemoteVideosValid()
|
req.checkBody('data').isEachRemoteVideosValid()
|
||||||
|
|
||||||
logger.debug('Checking remoteVideos parameters', { parameters: req.body })
|
logger.debug('Checking remoteVideos parameters', { parameters: req.body })
|
||||||
|
|
Loading…
Reference in New Issue