diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 17:17:52 +0200 |
commit | 1a42c9e2c0fb64cdbebd81b311736e752f591e0a (patch) | |
tree | e893324d730878257491428ffca634a92f1eea05 /server/controllers/api/v1/pods.js | |
parent | d56ec0d4129160a6e3b51ace3766bb325db1f101 (diff) | |
download | PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.gz PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.tar.zst PeerTube-1a42c9e2c0fb64cdbebd81b311736e752f591e0a.zip |
Server: udpate async to 2.0.0
Diffstat (limited to 'server/controllers/api/v1/pods.js')
-rw-r--r-- | server/controllers/api/v1/pods.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/v1/pods.js index 4413fbc1e..2bc761fef 100644 --- a/server/controllers/api/v1/pods.js +++ b/server/controllers/api/v1/pods.js | |||
@@ -1,8 +1,9 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const async = require('async') | 3 | const each = require('async/each') |
4 | const express = require('express') | 4 | const express = require('express') |
5 | const mongoose = require('mongoose') | 5 | const mongoose = require('mongoose') |
6 | const waterfall = require('async/waterfall') | ||
6 | 7 | ||
7 | const logger = require('../../../helpers/logger') | 8 | const logger = require('../../../helpers/logger') |
8 | const friends = require('../../../lib/friends') | 9 | const friends = require('../../../lib/friends') |
@@ -31,7 +32,7 @@ module.exports = router | |||
31 | function addPods (req, res, next) { | 32 | function addPods (req, res, next) { |
32 | const informations = req.body | 33 | const informations = req.body |
33 | 34 | ||
34 | async.waterfall([ | 35 | waterfall([ |
35 | function addPod (callback) { | 36 | function addPod (callback) { |
36 | const pod = new Pod(informations) | 37 | const pod = new Pod(informations) |
37 | pod.save(function (err, podCreated) { | 38 | pod.save(function (err, podCreated) { |
@@ -82,7 +83,7 @@ function makeFriends (req, res, next) { | |||
82 | function removePods (req, res, next) { | 83 | function removePods (req, res, next) { |
83 | const url = req.body.signature.url | 84 | const url = req.body.signature.url |
84 | 85 | ||
85 | async.waterfall([ | 86 | waterfall([ |
86 | function loadPod (callback) { | 87 | function loadPod (callback) { |
87 | Pod.loadByUrl(url, callback) | 88 | Pod.loadByUrl(url, callback) |
88 | }, | 89 | }, |
@@ -106,7 +107,7 @@ function removePods (req, res, next) { | |||
106 | }, | 107 | }, |
107 | 108 | ||
108 | function removeTheRemoteVideos (videosList, callback) { | 109 | function removeTheRemoteVideos (videosList, callback) { |
109 | async.each(videosList, function (video, callbackEach) { | 110 | each(videosList, function (video, callbackEach) { |
110 | video.remove(callbackEach) | 111 | video.remove(callbackEach) |
111 | }, callback) | 112 | }, callback) |
112 | } | 113 | } |