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:
parent
5a298a5a3d
commit
7b6cf83e33
3 changed files with 48 additions and 15 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue