From: Chocobozzz Date: Thu, 5 Dec 2019 09:18:33 +0000 (+0100) Subject: Fix channel creation limitation X-Git-Tag: v2.1.0-rc.1~262 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2;p=oweals%2Fpeertube.git Fix channel creation limitation --- 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 = [ } 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) .send({ error: `You cannot create more than ${VIDEO_CHANNELS.MAX_PER_USER} channels` }) .end()