From 1a42c9e2c0fb64cdbebd81b311736e752f591e0a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 Jul 2016 17:17:52 +0200 Subject: Server: udpate async to 2.0.0 --- server/controllers/api/v1/pods.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/controllers/api/v1/pods.js') 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 @@ 'use strict' -const async = require('async') +const each = require('async/each') const express = require('express') const mongoose = require('mongoose') +const waterfall = require('async/waterfall') const logger = require('../../../helpers/logger') const friends = require('../../../lib/friends') @@ -31,7 +32,7 @@ module.exports = router function addPods (req, res, next) { const informations = req.body - async.waterfall([ + waterfall([ function addPod (callback) { const pod = new Pod(informations) pod.save(function (err, podCreated) { @@ -82,7 +83,7 @@ function makeFriends (req, res, next) { function removePods (req, res, next) { const url = req.body.signature.url - async.waterfall([ + waterfall([ function loadPod (callback) { Pod.loadByUrl(url, callback) }, @@ -106,7 +107,7 @@ function removePods (req, res, next) { }, function removeTheRemoteVideos (videosList, callback) { - async.each(videosList, function (video, callbackEach) { + each(videosList, function (video, callbackEach) { video.remove(callbackEach) }, callback) } -- cgit v1.2.3