From 80a6c9e76fda57f01e37fe4620771ae70738a211 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Oct 2016 11:20:45 +0200 Subject: Server: pod removing refractoring --- server/lib/friends.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'server/lib') diff --git a/server/lib/friends.js b/server/lib/friends.js index 556d2e773..55cecc53e 100644 --- a/server/lib/friends.js +++ b/server/lib/friends.js @@ -97,25 +97,13 @@ function quitFriends (callback) { // Don't stop the process } - return callbackAsync() + return callbackAsync(null, pods) }) }, - function removePodsFromDB (callbackAsync) { - Pod.removeAll(function (err) { - return callbackAsync(err) - }) - }, - - function listRemoteVideos (callbackAsync) { - logger.info('Broke friends, so sad :(') - - Video.listRemotes(callbackAsync) - }, - - function removeTheRemoteVideos (videosList, callbackAsync) { - each(videosList, function (video, callbackEach) { - video.remove(callbackEach) + function removePodsFromDB (pods, callbackAsync) { + each(pods, function (pod, callbackEach) { + pod.remove(callbackEach) }, callbackAsync) } ], function (err) { -- cgit v1.2.3