The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add pagination
Steven Tey5274f9706dc5
diff --git a/apps/web/app/api/customers/route.ts b/apps/web/app/api/customers/route.tsindex ad40437392..a0acbca7bb 100644--- a/apps/web/app/api/customers/route.ts+++ b/apps/web/app/api/customers/route.ts@@ -11,11 +11,15 @@ import { NextResponse } from "next/server";// GET /api/customers – Get all customersexport const GET = withWorkspace(- async ({ req, workspace }) => {+ async ({ workspace }) => {const customers = await prisma.customer.findMany({where: {projectId: workspace.id,},+ take: 100,+ orderBy: {+ createdAt: "asc",+ },});return NextResponse.json(