Be more explicit after unsubscribing from weekly trending
This commit is contained in:
parent
6929076740
commit
3bea983662
|
@ -4,7 +4,7 @@ import { getAllPrivateUsers } from './utils'
|
||||||
|
|
||||||
export const resetWeeklyEmailsFlag = functions
|
export const resetWeeklyEmailsFlag = functions
|
||||||
.runWith({ secrets: ['MAILGUN_KEY'] })
|
.runWith({ secrets: ['MAILGUN_KEY'] })
|
||||||
// every Monday at 1 am PT (UTC -07:00) ( 12 hours before the emails will be sent)
|
// every Monday at 12 am PT (UTC -07:00) ( 12 hours before the emails will be sent)
|
||||||
.pubsub.schedule('0 7 * * 1')
|
.pubsub.schedule('0 7 * * 1')
|
||||||
.timeZone('Etc/UTC')
|
.timeZone('Etc/UTC')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
|
|
|
@ -69,6 +69,10 @@ export const unsubscribe: EndpointDefinition = {
|
||||||
res.send(
|
res.send(
|
||||||
`${name}, you have been unsubscribed from market answer emails on Manifold Markets.`
|
`${name}, you have been unsubscribed from market answer emails on Manifold Markets.`
|
||||||
)
|
)
|
||||||
|
else if (type === 'weekly-trending')
|
||||||
|
res.send(
|
||||||
|
`${name}, you have been unsubscribed from weekly trending emails on Manifold Markets.`
|
||||||
|
)
|
||||||
else res.send(`${name}, you have been unsubscribed.`)
|
else res.send(`${name}, you have been unsubscribed.`)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { DAY_MS } from '../../common/util/time'
|
||||||
export const weeklyMarketsEmails = functions
|
export const weeklyMarketsEmails = functions
|
||||||
.runWith({ secrets: ['MAILGUN_KEY'] })
|
.runWith({ secrets: ['MAILGUN_KEY'] })
|
||||||
// every minute on Monday for an hour at 12pm PT (UTC -07:00)
|
// every minute on Monday for an hour at 12pm PT (UTC -07:00)
|
||||||
.pubsub.schedule('* 18 * * 1')
|
.pubsub.schedule('* 19 * * 1')
|
||||||
.timeZone('Etc/UTC')
|
.timeZone('Etc/UTC')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
await sendTrendingMarketsEmailsToAllUsers()
|
await sendTrendingMarketsEmailsToAllUsers()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user