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.

Merge branch 'main' into tim/multiple-tags

Tim Wilson4fad6952e8a4
diff --cc apps/web/app/api/admin/links/count/route.ts
index 0a175b0d16,469a9b53e3..39389327ed
--- a/apps/web/app/api/admin/links/count/route.ts
+++ b/apps/web/app/api/admin/links/count/route.ts
@@@ -3,10 -3,10 +3,10 @@@ import { NextResponse } from "next/serv
import prisma from "@/lib/prisma";
import { DUB_DOMAINS, LEGAL_USER_ID } from "@dub/utils";
- // GET /api/links – get all user links
+ // GET /api/admin/links/count
export const GET = withAdmin(async ({ searchParams }) => {
let { groupBy, search, domain, tagId } = searchParams as {
- groupBy?: "domain" | "tagId";
+ groupBy?: "domain";
search?: string;
domain?: string;
tagId?: string;
diff --cc apps/web/app/api/admin/links/route.ts
index 8ef4e4eda5,998ec9a4c5..d3fa1f1974
--- a/apps/web/app/api/admin/links/route.ts
+++ b/apps/web/app/api/admin/links/route.ts
@@@ -1,9 -1,9 +1,9 @@@
import { withAdmin } from "@/lib/auth";
import { NextResponse } from "next/server";
import prisma from "@/lib/prisma";
-import { DUB_DOMAINS, LEGAL_USER_ID } from "@dub/utils";
+import { DUB_DOMAINS, LEGAL_USER_ID, ensureArray } from "@dub/utils";
- // GET /api/links – get all user links
+ // GET /api/admin/links
export const GET = withAdmin(async ({ searchParams }) => {
const {
domain,