The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
remove unused stuff
Steven Tey5e4f4dd9ecb9
diff --git a/apps/web/lib/planetscale.ts b/apps/web/lib/planetscale.tsindex 15ee78eeb2..5554f204e5 100644--- a/apps/web/lib/planetscale.ts+++ b/apps/web/lib/planetscale.ts@@ -6,21 +6,6 @@ export const pscale_config = {export const conn = connect(pscale_config);-// custom cached connection that sets next.revalidate to 900s-export const cachedConn = connect({- ...pscale_config,- fetch: (url, init) => {- // set next.revalidate- return fetch(url, {- ...init,- cache: undefined,- next: {- revalidate: 900,- },- });- },-});-export const getLinkViaEdge = async (domain: string, key: string) => {if (!process.env.DATABASE_URL) return null;@@ -45,32 +30,3 @@ export const getLinkViaEdge = async (domain: string, key: string) => {}): null;};--export const getTotalVerifiedDomains = async () => {- if (!cachedConn) return 1000;-- const { rows } = await cachedConn.execute(- "SELECT COUNT(*) FROM Domain WHERE verified = 1",- );- return rows && Array.isArray(rows) && rows.length > 0- ? rows[0]["count(*)"]- : 1000;-};--export const getTotalLinks = async () => {- if (!cachedConn) return 20000;-- const { rows } = await cachedConn.execute("SELECT COUNT(*) FROM Link");- return rows && Array.isArray(rows) && rows.length > 0- ? rows[0]["count(*)"]- : 20000;-};--export const getTotalUsers = async () => {- if (!cachedConn) return 10000;-- const { rows } = await cachedConn.execute("SELECT COUNT(*) FROM User");- return rows && Array.isArray(rows) && rows.length > 0- ? rows[0]["count(*)"]- : 10000;-};