From 7920c273a204e2469416a30b752b12ccd3160102 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 24 Dec 2016 16:59:17 +0100 Subject: Move tags in another table --- server/lib/friends.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/lib/friends.js') diff --git a/server/lib/friends.js b/server/lib/friends.js index 3ed29f651..ad9e4fdae 100644 --- a/server/lib/friends.js +++ b/server/lib/friends.js @@ -66,10 +66,12 @@ function makeFriends (hosts, callback) { function quitFriends (callback) { // Stop pool requests db.Request.deactivate() - // Flush pool requests - db.Request.flush() waterfall([ + function flushRequests (callbackAsync) { + db.Request.flush(callbackAsync) + }, + function getPodsList (callbackAsync) { return db.Pod.list(callbackAsync) }, @@ -118,7 +120,7 @@ function removeVideoToFriends (videoParams) { } function sendOwnedVideosToPod (podId) { - db.Video.listOwnedAndPopulateAuthor(function (err, videosList) { + db.Video.listOwnedAndPopulateAuthorAndTags(function (err, videosList) { if (err) { logger.error('Cannot get the list of videos we own.') return @@ -226,7 +228,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) { } // Add our videos to the request scheduler - sendOwnedVideosToPod(podCreated._id) + sendOwnedVideosToPod(podCreated.id) return callbackEach() }) -- cgit v1.2.3