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.

remove the old endpoints

Kiran K9af7003344aa
diff --git a/apps/web/app/api/analytics/share/[id]/route.ts b/apps/web/app/api/analytics/share/[id]/route.ts
deleted file mode 100644
index 029c204130..0000000000
--- a/apps/web/app/api/analytics/share/[id]/route.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { withWorkspace } from "@/lib/auth";
-import { prisma } from "@/lib/prisma";
-import { waitUntil } from "@vercel/functions";
-import { NextResponse } from "next/server";
-
-// DELETE /api/analytics/share/[id] – delete a shared dashboard for a link
-export const DELETE = withWorkspace(
- async ({ params, workspace }) => {
- const { id } = params;
-
- const res = await prisma.dashboard.delete({
- where: {
- id,
- projectId: workspace.id,
- },
- });
-
- // for backwards compatibility, we'll update the link to have publicStats = false
- if (res.linkId) {
- waitUntil(
- prisma.link.update({
- where: { id: res.linkId },
- data: { publicStats: false },
- }),
- );
- }
-
- return NextResponse.json({ id });
- },
- {
- requiredPermissions: ["links.write"],
- },
-);