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 improvements

Steven Teybceda9a05a84
diff --git a/apps/web/lib/actions/partners/retry-failed-paypal-payouts.ts b/apps/web/lib/actions/partners/retry-failed-paypal-payouts.ts
index d09a0980ef..99372dc82a 100644
--- a/apps/web/lib/actions/partners/retry-failed-paypal-payouts.ts
+++ b/apps/web/lib/actions/partners/retry-failed-paypal-payouts.ts
@@ -126,6 +126,7 @@ export const retryFailedPaypalPayoutsAction = authPartnerActionClient
},
data: {
status: "sent",
+ method: "paypal",
},
});
} catch (error) {
diff --git a/apps/web/lib/auth/sso-login-programs.ts b/apps/web/lib/auth/sso-login-programs.ts
index fe2935bea4..80c16d14ed 100644
--- a/apps/web/lib/auth/sso-login-programs.ts
+++ b/apps/web/lib/auth/sso-login-programs.ts
@@ -30,11 +30,15 @@ export const SSO_LOGIN_PROGRAMS = [
// @see: https://developers.beehiiv.com/api-reference/oauth-users/identify
mapProfile: (profile) => {
const { email, first_name, last_name, profile_picture } = profile;
+ if (!email) {
+ // should never happen, but just in case
+ throw new Error("Beehiiv profile is missing an email address");
+ }
return {
- id: email || undefined,
- name: `${first_name} ${last_name}`.trim(),
+ id: email,
+ name: [first_name, last_name].filter(Boolean).join(" ") || email,
email,
- image: profile_picture,
+ image: profile_picture ?? null,
};
},
},