Skip to content

Commit

Permalink
馃洜 fix limit
Browse files Browse the repository at this point in the history
  • Loading branch information
romanesko committed May 24, 2022
1 parent 64de2cd commit cf0373b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export class ChannelCrudController

async recent(
request: FastifyRequest<{
Querystring: ChannelListQueryParameters;
Querystring: { limit: 100 };
Params: BaseChannelsParameters;
}>,
): Promise<ResourceListResponse<ChannelObject>> {
Expand Down Expand Up @@ -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),
};
}
}
Expand Down

0 comments on commit cf0373b

Please sign in to comment.