diff options
Diffstat (limited to 'server/controllers/api/v1/remoteVideos.js')
-rw-r--r-- | server/controllers/api/v1/remoteVideos.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/server/controllers/api/v1/remoteVideos.js b/server/controllers/api/v1/remoteVideos.js index 7622e39f5..58222de52 100644 --- a/server/controllers/api/v1/remoteVideos.js +++ b/server/controllers/api/v1/remoteVideos.js | |||
@@ -1,15 +1,15 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | var express = require('express') | 3 | const express = require('express') |
4 | var pluck = require('lodash-node/compat/collection/pluck') | 4 | const pluck = require('lodash-node/compat/collection/pluck') |
5 | 5 | ||
6 | var middleware = require('../../../middlewares') | 6 | const middleware = require('../../../middlewares') |
7 | var secureMiddleware = middleware.secure | 7 | const secureMiddleware = middleware.secure |
8 | var cacheMiddleware = middleware.cache | 8 | const cacheMiddleware = middleware.cache |
9 | var reqValidator = middleware.reqValidators.remote | 9 | const reqValidator = middleware.reqValidators.remote |
10 | var videos = require('../../../models/videos') | 10 | const videos = require('../../../models/videos') |
11 | 11 | ||
12 | var router = express.Router() | 12 | const router = express.Router() |
13 | 13 | ||
14 | router.post('/add', | 14 | router.post('/add', |
15 | reqValidator.secureRequest, | 15 | reqValidator.secureRequest, |
@@ -42,8 +42,8 @@ function addRemoteVideos (req, res, next) { | |||
42 | } | 42 | } |
43 | 43 | ||
44 | function removeRemoteVideo (req, res, next) { | 44 | function removeRemoteVideo (req, res, next) { |
45 | var url = req.body.signature.url | 45 | const url = req.body.signature.url |
46 | var magnetUris = pluck(req.body.data, 'magnetUri') | 46 | const magnetUris = pluck(req.body.data, 'magnetUri') |
47 | 47 | ||
48 | videos.removeRemotesOfByMagnetUris(url, magnetUris, function (err) { | 48 | videos.removeRemotesOfByMagnetUris(url, magnetUris, function (err) { |
49 | if (err) return next(err) | 49 | if (err) return next(err) |