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.

small changes

Steven Teye643135d4424
diff --git a/apps/web/app/(ee)/api/cron/bounties/notify-partners/route.ts b/apps/web/app/(ee)/api/cron/bounties/notify-partners/route.ts
index c42f53b4c6..fefd629988 100644
--- a/apps/web/app/(ee)/api/cron/bounties/notify-partners/route.ts
+++ b/apps/web/app/(ee)/api/cron/bounties/notify-partners/route.ts
@@ -80,6 +80,10 @@ export async function POST(req: Request) {
email: {
not: null,
},
+ // only notify partners who have signed up for an account on partners.dub.co
+ users: {
+ some: {},
+ },
},
},
include: {
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/page.tsx
index 02411256f7..4ea7dc1b28 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/page.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/page.tsx
@@ -7,7 +7,11 @@ export default function Page() {
return (
<PageContent
title="Bounties"
- // TODO: add title info & href
+ titleInfo={{
+ title:
+ "Drive partner engagement by creating performance and submission bounties for your partner program.",
+ href: "https://dub.co/help/article/program-bounties",
+ }}
controls={<CreateBountyButton />}
>
<PageWidthWrapper>
diff --git a/apps/web/scripts/bulk-update-links.ts b/apps/web/scripts/bulk-update-links.ts
new file mode 100644
index 0000000000..cd3ecf200f
--- /dev/null
+++ b/apps/web/scripts/bulk-update-links.ts
@@ -0,0 +1,43 @@
+import { includeTags } from "@/lib/api/links/include-tags";
+import { prisma } from "@dub/prisma";
+import "dotenv-flow/config";
+import { recordLink } from "../lib/tinybird";
+
+async function main() {
+ const linksToUpdate = await prisma.link.findMany({
+ where: {
+ programId: "prog_xxx",
+ partnerId: "pn_xxx",
+ },
+ });
+
+ console.log(`Found ${linksToUpdate.length} links to update`);
+ console.table(linksToUpdate.slice(-10), ["domain", "key"]);
+
+ const res = await prisma.link.updateMany({
+ where: {
+ id: {
+ in: linksToUpdate.map((link) => link.id),
+ },
+ },
+ data: {
+ tenantId: "xxx",
+ },
+ });
+
+ console.log(res);
+
+ const updatedLinks = await prisma.link.findMany({
+ where: {
+ id: {
+ in: linksToUpdate.map((link) => link.id),
+ },
+ },
+ include: includeTags,
+ });
+
+ const tbRes = await recordLink(updatedLinks);
+ console.log(tbRes);
+}
+
+main();