Fix channel creation limitation

pull/2302/head
Chocobozzz 2019-12-05 10:18:33 +01:00
parent 3a1fed11c5
commit 5197732bce
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -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()