diff --git a/functions/src/emails.ts b/functions/src/emails.ts index dd91789a..1c7914be 100644 --- a/functions/src/emails.ts +++ b/functions/src/emails.ts @@ -648,8 +648,8 @@ export const sendWeeklyPortfolioUpdateEmail = async ( }) await sendTemplateEmail( - privateUser.email, - // 'iansphilips@gmail.com', + // privateUser.email, + 'iansphilips@gmail.com', `Here's your weekly portfolio update!`, investments.length === 0 ? 'portfolio-update-no-movers' diff --git a/functions/src/weekly-portfolio-emails.ts b/functions/src/weekly-portfolio-emails.ts index 2f1ee789..740a0ced 100644 --- a/functions/src/weekly-portfolio-emails.ts +++ b/functions/src/weekly-portfolio-emails.ts @@ -3,6 +3,7 @@ import * as admin from 'firebase-admin' import { Contract, CPMMContract } from '../../common/contract' import { + getAllPrivateUsers, getPrivateUser, getUser, getValue, @@ -36,12 +37,12 @@ const firestore = admin.firestore() export async function sendPortfolioUpdateEmailsToAllUsers() { const privateUsers = isProd() ? // ian & stephen's ids - filterDefined([ - await getPrivateUser('AJwLWoo3xue32XIiAVrL5SyR1WB2'), - // await getPrivateUser('tlmGNz9kjXc2EteizMORes4qvWl2'), - ]) - : // await getAllPrivateUsers() - filterDefined([await getPrivateUser('6hHpzvRG0pMq8PNJs7RZj2qlZGn2')]) + // filterDefined([ + // await getPrivateUser('AJwLWoo3xue32XIiAVrL5SyR1WB2'), + // await getPrivateUser('tlmGNz9kjXc2EteizMORes4qvWl2'), + // ]) + await getAllPrivateUsers() + : filterDefined([await getPrivateUser('6hHpzvRG0pMq8PNJs7RZj2qlZGn2')]) // get all users that haven't unsubscribed from weekly emails const privateUsersToSendEmailsTo = privateUsers .filter((user) => {