aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-04-14 09:57:37 +0200
committerChocobozzz <me@florianbigard.com>2023-04-14 10:14:40 +0200
commite7c89cc3f3e69776c6ad62e62a52f8d2f12a81c1 (patch)
tree88dcb15bd523af9fe42fa1fc1d380c3b8dfba089 /server/middlewares
parent8b95440c8ac050594955926f18dab9f6d4a86e19 (diff)
downloadPeerTube-e7c89cc3f3e69776c6ad62e62a52f8d2f12a81c1.tar.gz
PeerTube-e7c89cc3f3e69776c6ad62e62a52f8d2f12a81c1.tar.zst
PeerTube-e7c89cc3f3e69776c6ad62e62a52f8d2f12a81c1.zip
Allow to update a live with untouched privacy
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/videos/videos.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index ea6bd0721..d3014e8e7 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -234,7 +234,7 @@ const videosUpdateValidator = getCommonVideoEditAttributes().concat([
234 if (!await doesVideoExist(req.params.id, res)) return cleanUpReqFiles(req) 234 if (!await doesVideoExist(req.params.id, res)) return cleanUpReqFiles(req)
235 235
236 const video = getVideoWithAttributes(res) 236 const video = getVideoWithAttributes(res)
237 if (req.body.privacy && video.isLive && video.state !== VideoState.WAITING_FOR_LIVE) { 237 if (video.isLive && video.privacy !== req.body.privacy && video.state !== VideoState.WAITING_FOR_LIVE) {
238 return res.fail({ message: 'Cannot update privacy of a live that has already started' }) 238 return res.fail({ message: 'Cannot update privacy of a live that has already started' })
239 } 239 }
240 240