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.

added some comments

Steven Tey29b0d5e65c3b
diff --git a/pages/api/links/_count.ts b/pages/api/links/_count.ts
index 3b2b247ac4..761f2e4d68 100644
--- a/pages/api/links/_count.ts
+++ b/pages/api/links/_count.ts
@@ -3,7 +3,7 @@ import { DUB_PROJECT_ID } from "@/lib/constants";
import { getLinksCount } from "@/lib/api/links";
export default withLinksAuth(async (req, res, session, project) => {
- // GET /api/links/count – get the number of links for a project
+ // GET /api/links/_count – get the number of links for a project
if (req.method === "GET") {
const { userId } = req.query as { userId?: string };
const count = await getLinksCount({
diff --git a/pages/api/links/_random.ts b/pages/api/links/_random.ts
index f61a24f226..965d10a7a4 100644
--- a/pages/api/links/_random.ts
+++ b/pages/api/links/_random.ts
@@ -2,6 +2,7 @@ import { withLinksAuth } from "@/lib/auth";
import { getRandomKey } from "@/lib/api/links";
export default withLinksAuth(async (req, res, _session, _project, domain) => {
+ // GET /api/links/_random – get a random key for a project
if (req.method === "GET") {
const response = await getRandomKey(domain || "dub.sh");
return res.status(200).json(response);