1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix redundancy remove on host redundancy update

This commit is contained in:
Chocobozzz 2021-08-26 10:00:12 +02:00
parent 5a298a5a3d
commit 7b6cf83e33
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 48 additions and 15 deletions

View file

@ -106,9 +106,11 @@ async function updateRedundancy (req: express.Request, res: express.Response) {
await server.save()
// Async, could be long
removeRedundanciesOfServer(server.id)
.catch(err => logger.error('Cannot remove redundancy of %s.', server.host, { err }))
if (server.redundancyAllowed !== true) {
// Async, could be long
removeRedundanciesOfServer(server.id)
.catch(err => logger.error('Cannot remove redundancy of %s.', server.host, { err }))
}
return res.status(HttpStatusCode.NO_CONTENT_204).end()
}