Server: fix remote videos requests validator

This commit is contained in:
Chocobozzz 2016-08-21 09:54:46 +02:00
parent 4613274479
commit 6c1a098b41
2 changed files with 21 additions and 21 deletions

View File

@ -22,7 +22,8 @@ const videosValidators = {
}
function isEachRemoteVideosValid (requests) {
return requests.every(function (request) {
return miscValidators.isArray(requests) &&
requests.every(function (request) {
const video = request.data
return (
isRequestTypeAddValid(request.type) &&

View File

@ -19,7 +19,6 @@ function dataToDecrypt (req, res, next) {
}
function remoteVideos (req, res, next) {
req.checkBody('data').isArray()
req.checkBody('data').isEachRemoteVideosValid()
logger.debug('Checking remoteVideos parameters', { parameters: req.body })