mirror of https://github.com/Chocobozzz/PeerTube
Fix channel creation limitation
parent
3a1fed11c5
commit
5197732bce
|
@ -36,7 +36,7 @@ const videoChannelsAddValidator = [
|
||||||
}
|
}
|
||||||
|
|
||||||
const count = await VideoChannelModel.countByAccount(res.locals.oauth.token.User.Account.id)
|
const count = await VideoChannelModel.countByAccount(res.locals.oauth.token.User.Account.id)
|
||||||
if (count > VIDEO_CHANNELS.MAX_PER_USER) {
|
if (count >= VIDEO_CHANNELS.MAX_PER_USER) {
|
||||||
res.status(400)
|
res.status(400)
|
||||||
.send({ error: `You cannot create more than ${VIDEO_CHANNELS.MAX_PER_USER} channels` })
|
.send({ error: `You cannot create more than ${VIDEO_CHANNELS.MAX_PER_USER} channels` })
|
||||||
.end()
|
.end()
|
||||||
|
|
Loading…
Reference in New Issue