Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

use new endpoints

Kiran Kac792ae2d7b8
diff --git a/apps/web/ui/modals/share-dashboard-modal.tsx b/apps/web/ui/modals/share-dashboard-modal.tsx
index 0aa816dce6..eb89db74fe 100644
--- a/apps/web/ui/modals/share-dashboard-modal.tsx
+++ b/apps/web/ui/modals/share-dashboard-modal.tsx
@@ -50,8 +50,8 @@ function ShareDashboardModalInner({
);
const { data, mutate } = useSWR<{ id: string }>(
- workspaceId
- ? `/api/analytics/share?${new URLSearchParams({ workspaceId, domain, key }).toString()}`
+ link?.id
+ ? `/api/links/${link.id}/dashboard?workspaceId=${workspaceId}`
: undefined,
fetcher,
{
@@ -68,7 +68,7 @@ function ShareDashboardModalInner({
setChecked(true);
setIsCreating(true);
const res = await fetch(
- `/api/analytics/share?${new URLSearchParams({ workspaceId, domain, key }).toString()}`,
+ `/api/dashboards?${new URLSearchParams({ workspaceId, domain, key }).toString()}`,
{
method: "POST",
headers: {
@@ -109,7 +109,7 @@ function ShareDashboardModalInner({
setIsRemoving(true);
const res = await fetch(
- `/api/analytics/share/${data.id}?workspaceId=${workspaceId}`,
+ `/api/dashboards/${data.id}?workspaceId=${workspaceId}`,
{
method: "DELETE",
},