Fix live replay setting breaking change
This commit is contained in:
parent
5f79f37d10
commit
90b84bd4bb
|
@ -197,7 +197,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
|
||||||
|
|
||||||
if (videoLive.saveReplay) {
|
if (videoLive.saveReplay) {
|
||||||
const replaySettings = new VideoLiveReplaySettingModel({
|
const replaySettings = new VideoLiveReplaySettingModel({
|
||||||
privacy: videoInfo.replaySettings.privacy
|
privacy: videoInfo.replaySettings.privacy || videoCreated.privacy
|
||||||
})
|
})
|
||||||
await replaySettings.save(sequelizeOptions)
|
await replaySettings.save(sequelizeOptions)
|
||||||
|
|
||||||
|
|
|
@ -122,15 +122,6 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body.saveReplay && !body.replaySettings?.privacy) {
|
|
||||||
cleanUpReqFiles(req)
|
|
||||||
|
|
||||||
return res.fail({
|
|
||||||
status: HttpStatusCode.BAD_REQUEST_400,
|
|
||||||
message: 'Live replay is enabled but privacy replay setting is missing'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = res.locals.oauth.token.User
|
const user = res.locals.oauth.token.User
|
||||||
if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
|
if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue