From cf0373bf3252fc2b67dcabb94c450981d7523110 Mon Sep 17 00:00:00 2001 From: Roman Bykovskiy <8026787@gmail.com> Date: Tue, 24 May 2022 18:48:57 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20fix=20limit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node/src/services/channels/web/controllers/channel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twake/backend/node/src/services/channels/web/controllers/channel.ts b/twake/backend/node/src/services/channels/web/controllers/channel.ts index 16b8f9bcfe..a5e2abd4ce 100644 --- a/twake/backend/node/src/services/channels/web/controllers/channel.ts +++ b/twake/backend/node/src/services/channels/web/controllers/channel.ts @@ -493,7 +493,7 @@ export class ChannelCrudController async recent( request: FastifyRequest<{ - Querystring: ChannelListQueryParameters; + Querystring: { limit: 100 }; Params: BaseChannelsParameters; }>, ): Promise> { @@ -534,7 +534,7 @@ export class ChannelCrudController const filledChannels = await gr.services.channels.channels.fillChannelActivities(res); return { - resources: orderBy(filledChannels, "last_activity", "desc"), + resources: orderBy(filledChannels, "last_activity", "desc").slice(0, request.query.limit), }; } }