The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update endpoints
Kiran Ke03c6b10b1f5
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/dots-app/route.ts b/apps/web/app/api/dots/route.tssimilarity index 68%rename from apps/web/app/api/workspaces/[idOrSlug]/dots-app/route.tsrename to apps/web/app/api/dots/route.tsindex 2c0fa79e24..ba9271b53f 100644--- a/apps/web/app/api/workspaces/[idOrSlug]/dots-app/route.ts+++ b/apps/web/app/api/dots/route.ts@@ -2,8 +2,8 @@ import { withWorkspace } from "@/lib/auth";import { retrieveDotsApp } from "@/lib/dots/retrieve-dots-app";import { NextResponse } from "next/server";-// GET /api/workspaces/[idOrSlug]/dots-app – get Dots app for a workspace-export const GET = withWorkspace(async ({ workspace, session }) => {+// GET /api/dots – get Dots app for a workspace+export const GET = withWorkspace(async ({ workspace }) => {const { dotsAppId } = workspace;if (!dotsAppId) {diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/bank-accounts/wallet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/bank-accounts/wallet.tsxindex fbefffb02c..92d8d46cfc 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/bank-accounts/wallet.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/bank-accounts/wallet.tsx@@ -16,8 +16,8 @@ export const Wallet = () => {// TODO:// Move this to a hook- const { data } = useSWR<DotsApp>(- `/api/workspaces/${workspace.id}/dots-app`,+ const { data, isLoading } = useSWR<DotsApp>(+ `/api/dots?workspaceId=${workspace.id}`,fetcher,);@@ -30,8 +30,13 @@ export const Wallet = () => {</div><div className="flex grow flex-col gap-1">- <div className="text-base font-semibold text-gray-700">- Wallet - ${data?.metrics.wallet_balance}+ <div className="flex items-center gap-2 text-base font-semibold text-gray-700">+ Wallet{" "}+ {isLoading ? (+ <div className="h-4 w-20 animate-pulse rounded bg-neutral-200" />+ ) : (+ `($${data?.metrics.wallet_balance})`+ )}</div><div className="text-sm text-neutral-500">Wallet balance and transaction history.