+function videoRate (req, res, next) {
+ req.checkParams('id', 'Should have a valid id').notEmpty().isUUID(4)
+ req.checkBody('rating', 'Should have a valid rate type').isVideoRatingTypeValid()
+
+ logger.debug('Checking videoRate parameters', { parameters: req.body })
+
+ checkErrors(req, res, function () {
+ checkVideoExists(req.params.id, res, next)
+ })
+}
+