diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-03-16 22:29:27 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-03-16 22:29:27 +0100 |
commit | f0f5567b6918fc60c8cab15e13aec03a89a91dfb (patch) | |
tree | 99dfdb9fa8273c9cda1360fd3b6bfccc515bf8be /server/controllers/api/v1/remoteVideos.js | |
parent | 5101105ef91bfe478f97546b78b321882da2079c (diff) | |
download | PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.gz PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.zst PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.zip |
Use const/let now we use node 4.2
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) |