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.

update help portal href

Steven Teyc28c9a820f62
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/layout.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/layout.tsx
index f9f057ccaf..bf65248a1e 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/layout.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/layout.tsx
@@ -12,7 +12,7 @@ export default function PartnerDashboardLayout({
<MainNav
toolContent={
<a
- href="https://dub.co/help/category/partners"
+ href="https://dub.co/help/category/programs"
target="_blank"
className="text-content-default hover:bg-bg-inverted/5 flex size-11 shrink-0 items-center justify-center rounded-lg"
>
diff --git a/apps/web/scripts/perplexity/update-notifications.ts b/apps/web/scripts/perplexity/update-notifications.ts
new file mode 100644
index 0000000000..23378f8db8
--- /dev/null
+++ b/apps/web/scripts/perplexity/update-notifications.ts
@@ -0,0 +1,49 @@
+import { prisma } from "@dub/prisma";
+import "dotenv-flow/config";
+
+// bulk update notification preferences for a project
+async function main() {
+ const notificationPreferences = await prisma.notificationPreference.findMany({
+ where: {
+ AND: [
+ {
+ projectUser: {
+ projectId: "xxx",
+ },
+ },
+ {
+ projectUser: {
+ user: {
+ email: {
+ notIn: ["[email protected]"],
+ },
+ },
+ },
+ },
+ ],
+ },
+ });
+
+ console.log(
+ `Found ${notificationPreferences.length} notification preferences to update`,
+ );
+
+ const res = await prisma.notificationPreference.updateMany({
+ where: {
+ id: {
+ in: notificationPreferences.map(
+ (notificationPreference) => notificationPreference.id,
+ ),
+ },
+ },
+ data: {
+ newPartnerApplication: false,
+ newPartnerSale: false,
+ newMessageFromPartner: false,
+ },
+ });
+
+ console.log(`Updated ${res.count} notification preferences`);
+}
+
+main();