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 temp files, standardize ReferralsEmbedLinkSchema

Steven Tey345699f7d579
diff --git a/apps/web/app/(ee)/app.dub.co/embed/referrals/links-list.tsx b/apps/web/app/(ee)/app.dub.co/embed/referrals/links-list.tsx
index 7e0dbd2246..e1556882ea 100644
--- a/apps/web/app/(ee)/app.dub.co/embed/referrals/links-list.tsx
+++ b/apps/web/app/(ee)/app.dub.co/embed/referrals/links-list.tsx
@@ -9,13 +9,7 @@ import {
useTable,
} from "@dub/ui";
import { ArrowTurnRight2, Pen2, Plus2 } from "@dub/ui/icons";
-import {
- currencyFormatter,
- fetcher,
- getApexDomain,
- getPrettyUrl,
- nFormatter,
-} from "@dub/utils";
+import { fetcher, getApexDomain, getPrettyUrl, nFormatter } from "@dub/utils";
import { motion } from "motion/react";
import { useEffect, useState } from "react";
import useSWR from "swr";
@@ -119,11 +113,11 @@ export function ReferralsEmbedLinksList({ onCreateLink, onEditLink }: Props) {
cell: ({ row }) => nFormatter(row.original.leads),
},
{
- id: "sales",
- header: "Sales",
+ id: "conversions",
+ header: "Conversions",
minSize: 80,
maxSize: 100,
- cell: ({ row }) => currencyFormatter(row.original.saleAmount),
+ cell: ({ row }) => nFormatter(row.original.conversions),
},
{
id: "actions",
diff --git a/apps/web/app/wellknown/[domain]/[file]/route.ts b/apps/web/app/wellknown/[domain]/[file]/route.ts
index 8568c68d05..b582f59c49 100644
--- a/apps/web/app/wellknown/[domain]/[file]/route.ts
+++ b/apps/web/app/wellknown/[domain]/[file]/route.ts
@@ -17,20 +17,6 @@ export async function GET(
return NextResponse.json({ error: "File not supported" }, { status: 400 });
}
- if (file === "openai-apps-challenge") {
- if (domain !== "dub.sh") {
- return NextResponse.json(
- { error: "File not supported" },
- { status: 400 },
- );
- }
- return new Response(process.env.OPENAI_APPS_CHALLENGE_RESPONSE, {
- headers: {
- "Content-Type": "text/plain",
- },
- });
- }
-
const { appleAppSiteAssociation, assetLinks } =
(await prisma.domain.findUnique({
where: {
diff --git a/apps/web/lib/well-known.ts b/apps/web/lib/well-known.ts
index a70d9e6464..fb67e5b11c 100644
--- a/apps/web/lib/well-known.ts
+++ b/apps/web/lib/well-known.ts
@@ -6,13 +6,11 @@ export type WellKnownConfig = {
};
};
"assetlinks.json": any[];
- "openai-apps-challenge": any;
};
export const supportedWellKnownFiles = [
"apple-app-site-association",
"assetlinks.json",
- "openai-apps-challenge",
];
export type SupportedWellKnownFiles = keyof WellKnownConfig;
diff --git a/apps/web/lib/zod/schemas/referrals-embed.ts b/apps/web/lib/zod/schemas/referrals-embed.ts
index d5317d97e9..8fc0124414 100644
--- a/apps/web/lib/zod/schemas/referrals-embed.ts
+++ b/apps/web/lib/zod/schemas/referrals-embed.ts
@@ -9,8 +9,7 @@ export const ReferralsEmbedLinkSchema = LinkSchema.pick({
shortLink: true,
clicks: true,
leads: true,
- sales: true,
- saleAmount: true,
+ conversions: true,
}).extend({
partnerGroupDefaultLinkId: z.string().nullish(),
});