aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/remoteVideos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-16 22:29:27 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-16 22:29:27 +0100
commitf0f5567b6918fc60c8cab15e13aec03a89a91dfb (patch)
tree99dfdb9fa8273c9cda1360fd3b6bfccc515bf8be /server/controllers/api/v1/remoteVideos.js
parent5101105ef91bfe478f97546b78b321882da2079c (diff)
downloadPeerTube-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.js20
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
3var express = require('express') 3const express = require('express')
4var pluck = require('lodash-node/compat/collection/pluck') 4const pluck = require('lodash-node/compat/collection/pluck')
5 5
6var middleware = require('../../../middlewares') 6const middleware = require('../../../middlewares')
7var secureMiddleware = middleware.secure 7const secureMiddleware = middleware.secure
8var cacheMiddleware = middleware.cache 8const cacheMiddleware = middleware.cache
9var reqValidator = middleware.reqValidators.remote 9const reqValidator = middleware.reqValidators.remote
10var videos = require('../../../models/videos') 10const videos = require('../../../models/videos')
11 11
12var router = express.Router() 12const router = express.Router()
13 13
14router.post('/add', 14router.post('/add',
15 reqValidator.secureRequest, 15 reqValidator.secureRequest,
@@ -42,8 +42,8 @@ function addRemoteVideos (req, res, next) {
42} 42}
43 43
44function removeRemoteVideo (req, res, next) { 44function 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)