We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 611716d + 0679b99 commit aed3b0dCopy full SHA for aed3b0d
routes/index.tsx
@@ -21,7 +21,8 @@ interface HomePageData extends State {
21
22
export const handler: Handlers<HomePageData, State> = {
23
async GET(_req, ctx) {
24
- const items = (await getAllItems()).slice(0, 10);
+ /** @todo Add pagination functionality */
25
+ const items = await getAllItems({ limit: 10 });
26
const users = await getUsersByIds(items.map((item) => item.userId));
27
const commentsCounts = await Promise.all(
28
items.map((item) => getItemCommentsCount(item.id)),
0 commit comments