diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-05 10:18:33 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-05 10:18:33 +0100 |
commit | 5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2 (patch) | |
tree | de566edc62a51b744c3432e4a938762d6b420162 /server/middlewares/validators | |
parent | 3a1fed11c52705002cbf2a17294509fb5a89237c (diff) | |
download | PeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.tar.gz PeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.tar.zst PeerTube-5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2.zip |
Fix channel creation limitation
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/videos/video-channels.ts | 2 |
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() |