mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Server: make friends urls come from the request instead of the
configuration file
This commit is contained in:
parent
e861452fb2
commit
1e2564d392
14 changed files with 82 additions and 44 deletions
|
@ -19,7 +19,7 @@ const Video = mongoose.model('Video')
|
|||
|
||||
router.get('/', listPodsUrl)
|
||||
router.post('/', validators.podsAdd, addPods)
|
||||
router.get('/makefriends',
|
||||
router.post('/makefriends',
|
||||
oAuth.authenticate,
|
||||
admin.ensureIsAdmin,
|
||||
validators.makeFriends,
|
||||
|
@ -83,7 +83,9 @@ function listPodsUrl (req, res, next) {
|
|||
}
|
||||
|
||||
function makeFriends (req, res, next) {
|
||||
friends.makeFriends(function (err) {
|
||||
const urls = req.body.urls
|
||||
|
||||
friends.makeFriends(urls, function (err) {
|
||||
if (err) return next(err)
|
||||
|
||||
res.type('json').status(204).end()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue