Skip to content

Commit

Permalink
fix: limit feed to 10 items
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua committed May 4, 2023
1 parent 92b93d4 commit 1318f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface HomePageData extends State {

export const handler: Handlers<HomePageData, State> = {
async GET(_req, ctx) {
const items = await getAllItems();
const items = (await getAllItems()).slice(0, 10);
const users = await getUsersByIds(items.map((item) => item.userId));
const commentsCounts = await Promise.all(
items.map((item) => getItemCommentsCount(item.id)),
Expand Down

0 comments on commit 1318f75

Please sign in to comment.