From 5197732bcebb182cd7fc5c9f2bbc10b6d4843bc2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Dec 2019 10:18:33 +0100 Subject: Fix channel creation limitation --- server/middlewares/validators/videos/video-channels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares') 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() -- cgit v1.2.3