The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fixed ts errors
Steven Tey782b5246112e
diff --git a/pages/api/edge/links/[key]/stats/[endpoint].ts b/pages/api/edge/links/[key]/stats/[endpoint].tsindex 677906f5b5..45464f564e 100644--- a/pages/api/edge/links/[key]/stats/[endpoint].ts+++ b/pages/api/edge/links/[key]/stats/[endpoint].ts@@ -31,7 +31,7 @@ export default async function handler(req: NextRequest) {key,endpoint,interval,- createdAt: data.createdAt,+ createdAt: data?.createdAt,});return new Response(JSON.stringify(response), { status: 200 });diff --git a/pages/api/og/stats.tsx b/pages/api/og/stats.tsxindex f0b1ae7f03..86b4ecbdfa 100644--- a/pages/api/og/stats.tsx+++ b/pages/api/og/stats.tsx@@ -35,7 +35,7 @@ export default async function handler(req: NextRequest) {key,endpoint: "timeseries",interval: "30d",- createdAt: data.createdAt,+ createdAt: data?.createdAt,});const maxClicks = Math.max(...timeseries.map((t) => t.clicks));diff --git a/pages/api/projects/[slug]/domains/[domain]/clicks.ts b/pages/api/projects/[slug]/domains/[domain]/clicks.tsindex eae1e64677..0e840ba79f 100644--- a/pages/api/projects/[slug]/domains/[domain]/clicks.ts+++ b/pages/api/projects/[slug]/domains/[domain]/clicks.ts@@ -11,6 +11,7 @@ export default withProjectAuth(async (req, res) => {domain,key: "_root",endpoint: "clicks",+ createdAt: new Date("2021-09-22"),});return res.status(200).json(response);