aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/pods.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/pods.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/pods.js')
-rw-r--r--server/controllers/api/v1/pods.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/v1/pods.js
index fa9832914..dbe1a7372 100644
--- a/server/controllers/api/v1/pods.js
+++ b/server/controllers/api/v1/pods.js
@@ -1,20 +1,20 @@
1'use strict' 1'use strict'
2 2
3var express = require('express') 3const express = require('express')
4var fs = require('fs') 4const fs = require('fs')
5 5
6var logger = require('../../../helpers/logger') 6const logger = require('../../../helpers/logger')
7var friends = require('../../../lib/friends') 7const friends = require('../../../lib/friends')
8var middleware = require('../../../middlewares') 8const middleware = require('../../../middlewares')
9var cacheMiddleware = middleware.cache 9const cacheMiddleware = middleware.cache
10var peertubeCrypto = require('../../../helpers/peertubeCrypto') 10const peertubeCrypto = require('../../../helpers/peertubeCrypto')
11var Pods = require('../../../models/pods') 11const Pods = require('../../../models/pods')
12var reqValidator = middleware.reqValidators.pods 12const reqValidator = middleware.reqValidators.pods
13var secureMiddleware = middleware.secure 13const secureMiddleware = middleware.secure
14var secureRequest = middleware.reqValidators.remote.secureRequest 14const secureRequest = middleware.reqValidators.remote.secureRequest
15var Videos = require('../../../models/videos') 15const Videos = require('../../../models/videos')
16 16
17var router = express.Router() 17const router = express.Router()
18 18
19router.get('/', cacheMiddleware.cache(false), listPods) 19router.get('/', cacheMiddleware.cache(false), listPods)
20router.post('/', reqValidator.podsAdd, cacheMiddleware.cache(false), addPods) 20router.post('/', reqValidator.podsAdd, cacheMiddleware.cache(false), addPods)
@@ -30,7 +30,7 @@ module.exports = router
30// --------------------------------------------------------------------------- 30// ---------------------------------------------------------------------------
31 31
32function addPods (req, res, next) { 32function addPods (req, res, next) {
33 var informations = req.body.data 33 const informations = req.body.data
34 Pods.add(informations, function (err) { 34 Pods.add(informations, function (err) {
35 if (err) return next(err) 35 if (err) return next(err)
36 36
@@ -71,7 +71,7 @@ function makeFriends (req, res, next) {
71} 71}
72 72
73function removePods (req, res, next) { 73function removePods (req, res, next) {
74 var url = req.body.signature.url 74 const url = req.body.signature.url
75 Pods.remove(url, function (err) { 75 Pods.remove(url, function (err) {
76 if (err) return next(err) 76 if (err) return next(err)
77 77