aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-05 10:18:33 +0100
committerChocobozzz <me@florianbigard.com>2019-12-05 10:18:33 +0100
commit5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2 (patch)
treede566edc62a51b744c3432e4a938762d6b420162 /server
parent3a1fed11c52705002cbf2a17294509fb5a89237c (diff)
downloadPeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.tar.gz
PeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.tar.zst
PeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.zip
Fix channel creation limitation
Diffstat (limited to 'server')
-rw-r--r--server/middlewares/validators/videos/video-channels.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts
index ce2d61d49..ebce14714 100644
--- a/server/middlewares/validators/videos/video-channels.ts
+++ b/server/middlewares/validators/videos/video-channels.ts
@@ -36,7 +36,7 @@ const videoChannelsAddValidator = [
36 } 36 }
37 37
38 const count = await VideoChannelModel.countByAccount(res.locals.oauth.token.User.Account.id) 38 const count = await VideoChannelModel.countByAccount(res.locals.oauth.token.User.Account.id)
39 if (count > VIDEO_CHANNELS.MAX_PER_USER) { 39 if (count >= VIDEO_CHANNELS.MAX_PER_USER) {
40 res.status(400) 40 res.status(400)
41 .send({ error: `You cannot create more than ${VIDEO_CHANNELS.MAX_PER_USER} channels` }) 41 .send({ error: `You cannot create more than ${VIDEO_CHANNELS.MAX_PER_USER} channels` })
42 .end() 42 .end()