Skip to content

Commit

Permalink
Merge pull request #162 from denoland/fix-limit-10-items
Browse files Browse the repository at this point in the history
fix: limit feed to 10 items
  • Loading branch information
iuioiua authored May 4, 2023
2 parents 92b93d4 + 1318f75 commit 9662c76
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 9662c76

Please sign in to comment.