diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-05 19:41:22 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-05 19:41:22 +0100 |
commit | 1fe5076f63e0d3b291c4b9a2295220713f982f91 (patch) | |
tree | ed776cc0d43a4371c41f2d6c9f36a8155f68c042 /lib/friends.js | |
parent | 8425cb894d4867d26fd5f7fae7862b0669f3c717 (diff) | |
download | PeerTube-1fe5076f63e0d3b291c4b9a2295220713f982f91.tar.gz PeerTube-1fe5076f63e0d3b291c4b9a2295220713f982f91.tar.zst PeerTube-1fe5076f63e0d3b291c4b9a2295220713f982f91.zip |
Move the creation of requests in lib instead of model for poolrequests
Diffstat (limited to 'lib/friends.js')
-rw-r--r-- | lib/friends.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/friends.js b/lib/friends.js index badf09c7d..c05ccedb1 100644 --- a/lib/friends.js +++ b/lib/friends.js | |||
@@ -10,7 +10,6 @@ | |||
10 | var logger = require('../helpers/logger') | 10 | var logger = require('../helpers/logger') |
11 | var peertubeCrypto = require('../helpers/peertubeCrypto') | 11 | var peertubeCrypto = require('../helpers/peertubeCrypto') |
12 | var Pods = require('../models/pods') | 12 | var Pods = require('../models/pods') |
13 | var PoolRequests = require('../models/poolRequests') | ||
14 | var poolRequests = require('../lib/poolRequests') | 13 | var poolRequests = require('../lib/poolRequests') |
15 | var requests = require('../helpers/requests') | 14 | var requests = require('../helpers/requests') |
16 | var Videos = require('../models/videos') | 15 | var Videos = require('../models/videos') |
@@ -32,7 +31,7 @@ | |||
32 | var id = video.name + video.magnetUri | 31 | var id = video.name + video.magnetUri |
33 | // ensure namePath is null | 32 | // ensure namePath is null |
34 | video.namePath = null | 33 | video.namePath = null |
35 | PoolRequests.addRequest(id, 'add', video) | 34 | poolRequests.addRequest(id, 'add', video) |
36 | } | 35 | } |
37 | 36 | ||
38 | function hasFriends (callback) { | 37 | function hasFriends (callback) { |
@@ -204,7 +203,7 @@ | |||
204 | function removeVideoToFriends (video) { | 203 | function removeVideoToFriends (video) { |
205 | // To avoid duplicates | 204 | // To avoid duplicates |
206 | var id = video.name + video.magnetUri | 205 | var id = video.name + video.magnetUri |
207 | PoolRequests.addRequest(id, 'remove', video) | 206 | poolRequests.addRequest(id, 'remove', video) |
208 | } | 207 | } |
209 | 208 | ||
210 | // --------------------------------------------------------------------------- | 209 | // --------------------------------------------------------------------------- |