Reset portfolio flag on mondays at 12am
This commit is contained in:
parent
40a8067157
commit
90bf425acf
|
@ -17,6 +17,7 @@ export const resetWeeklyEmailsFlag = functions
|
||||||
privateUsers.map(async (user) => {
|
privateUsers.map(async (user) => {
|
||||||
return firestore.collection('private-users').doc(user.id).update({
|
return firestore.collection('private-users').doc(user.id).update({
|
||||||
weeklyTrendingEmailSent: false,
|
weeklyTrendingEmailSent: false,
|
||||||
|
weeklyPortfolioEmailSent: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -36,7 +36,10 @@ const firestore = admin.firestore()
|
||||||
export async function sendPortfolioUpdateEmailsToAllUsers() {
|
export async function sendPortfolioUpdateEmailsToAllUsers() {
|
||||||
const privateUsers = isProd()
|
const privateUsers = isProd()
|
||||||
? // ? await getAllPrivateUsers()
|
? // ? await getAllPrivateUsers()
|
||||||
filterDefined([await getPrivateUser('AJwLWoo3xue32XIiAVrL5SyR1WB2')])
|
filterDefined([
|
||||||
|
await getPrivateUser('AJwLWoo3xue32XIiAVrL5SyR1WB2'),
|
||||||
|
await getPrivateUser('tlmGNz9kjXc2EteizMORes4qvWl2'),
|
||||||
|
])
|
||||||
: filterDefined([await getPrivateUser('6hHpzvRG0pMq8PNJs7RZj2qlZGn2')])
|
: filterDefined([await getPrivateUser('6hHpzvRG0pMq8PNJs7RZj2qlZGn2')])
|
||||||
// get all users that haven't unsubscribed from weekly emails
|
// get all users that haven't unsubscribed from weekly emails
|
||||||
const privateUsersToSendEmailsTo = privateUsers
|
const privateUsersToSendEmailsTo = privateUsers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user