mirror of https://github.com/Chocobozzz/PeerTube
Do not wait the make friends process ends to send a response to the
requestpull/10/head
parent
6be622478a
commit
9ab1071c8d
|
@ -61,7 +61,8 @@ export class FriendAddComponent {
|
||||||
if (status === 409) {
|
if (status === 409) {
|
||||||
alert('Already made friends!');
|
alert('Already made friends!');
|
||||||
} else {
|
} else {
|
||||||
alert('Made friends!');
|
alert('Make friends request sent!');
|
||||||
|
this.router.navigate([ '/admin/friends/list' ]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => alert(error)
|
error => alert(error)
|
||||||
|
|
|
@ -86,10 +86,15 @@ function makeFriends (req, res, next) {
|
||||||
const urls = req.body.urls
|
const urls = req.body.urls
|
||||||
|
|
||||||
friends.makeFriends(urls, function (err) {
|
friends.makeFriends(urls, function (err) {
|
||||||
if (err) return next(err)
|
if (err) {
|
||||||
|
logger.error('Could not make friends.', { error: err })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
res.type('json').status(204).end()
|
logger.info('Made friends!')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
res.type('json').status(204).end()
|
||||||
}
|
}
|
||||||
|
|
||||||
function removePods (req, res, next) {
|
function removePods (req, res, next) {
|
||||||
|
|
Loading…
Reference in New Issue