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.

revert API changes

Kiran Ka264e83c38c9
diff --git a/apps/web/app/api/links/count/route.ts b/apps/web/app/api/links/count/route.ts
index 1e9929395f..3fbb0003b5 100644
--- a/apps/web/app/api/links/count/route.ts
+++ b/apps/web/app/api/links/count/route.ts
@@ -11,7 +11,7 @@ import { NextResponse } from "next/server";
export const GET = withWorkspace(
async ({ headers, searchParams, workspace, session }) => {
const params = getLinksCountQuerySchema.parse(searchParams);
- let {
+ const {
groupBy,
domain,
folderId,
@@ -40,8 +40,6 @@ export const GET = withWorkspace(
message: "Cannot get links count for mega folders.",
});
}
- } else {
- folderId = workspace.defaultFolderId ?? undefined;
}
/* we only need to get the folder ids if we are:
diff --git a/apps/web/app/api/links/route.ts b/apps/web/app/api/links/route.ts
index a8b0b28a5f..a0587760d6 100644
--- a/apps/web/app/api/links/route.ts
+++ b/apps/web/app/api/links/route.ts
@@ -22,7 +22,7 @@ import { NextResponse } from "next/server";
export const GET = withWorkspace(
async ({ headers, searchParams, workspace, session }) => {
const params = getLinksQuerySchemaExtended.parse(searchParams);
- let { domain, folderId, search, tagId, tagIds, tagNames, tenantId } =
+ const { domain, folderId, search, tagId, tagIds, tagNames, tenantId } =
params;
if (domain) {
@@ -37,8 +37,6 @@ export const GET = withWorkspace(
folderId,
requiredPermission: "folders.read",
});
- } else {
- folderId = workspace.defaultFolderId ?? undefined;
}
/* we only need to get the folder ids if we are: