1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Server: make friends urls come from the request instead of the

configuration file
This commit is contained in:
Chocobozzz 2016-08-20 16:59:25 +02:00
parent e861452fb2
commit 1e2564d392
14 changed files with 82 additions and 44 deletions

View file

@ -10,6 +10,11 @@ const validatorsPod = {
}
function makeFriends (req, res, next) {
req.checkBody('urls', 'Should have an array of urls').isArray()
req.checkBody('urls', 'Should be an url').isEachUrl()
logger.debug('Checking makeFriends parameters', { parameters: req.body })
friends.hasFriends(function (err, hasFriends) {
if (err) {
logger.error('Cannot know if we have friends.', { error: err })