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/pods.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/pods.js')
-rw-r--r-- | server/controllers/api/v1/pods.js | 34 |
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 | ||
3 | var express = require('express') | 3 | const express = require('express') |
4 | var fs = require('fs') | 4 | const fs = require('fs') |
5 | 5 | ||
6 | var logger = require('../../../helpers/logger') | 6 | const logger = require('../../../helpers/logger') |
7 | var friends = require('../../../lib/friends') | 7 | const friends = require('../../../lib/friends') |
8 | var middleware = require('../../../middlewares') | 8 | const middleware = require('../../../middlewares') |
9 | var cacheMiddleware = middleware.cache | 9 | const cacheMiddleware = middleware.cache |
10 | var peertubeCrypto = require('../../../helpers/peertubeCrypto') | 10 | const peertubeCrypto = require('../../../helpers/peertubeCrypto') |
11 | var Pods = require('../../../models/pods') | 11 | const Pods = require('../../../models/pods') |
12 | var reqValidator = middleware.reqValidators.pods | 12 | const reqValidator = middleware.reqValidators.pods |
13 | var secureMiddleware = middleware.secure | 13 | const secureMiddleware = middleware.secure |
14 | var secureRequest = middleware.reqValidators.remote.secureRequest | 14 | const secureRequest = middleware.reqValidators.remote.secureRequest |
15 | var Videos = require('../../../models/videos') | 15 | const Videos = require('../../../models/videos') |
16 | 16 | ||
17 | var router = express.Router() | 17 | const router = express.Router() |
18 | 18 | ||
19 | router.get('/', cacheMiddleware.cache(false), listPods) | 19 | router.get('/', cacheMiddleware.cache(false), listPods) |
20 | router.post('/', reqValidator.podsAdd, cacheMiddleware.cache(false), addPods) | 20 | router.post('/', reqValidator.podsAdd, cacheMiddleware.cache(false), addPods) |
@@ -30,7 +30,7 @@ module.exports = router | |||
30 | // --------------------------------------------------------------------------- | 30 | // --------------------------------------------------------------------------- |
31 | 31 | ||
32 | function addPods (req, res, next) { | 32 | function 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 | ||
73 | function removePods (req, res, next) { | 73 | function 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 | ||