Fix secret access for some email sending functions (#449)
This commit is contained in:
parent
2ac7caaf24
commit
0f0390cb6a
|
@ -5,8 +5,9 @@ import { Contract } from '../../common/contract'
|
||||||
import { getPrivateUser, getUserByUsername } from './utils'
|
import { getPrivateUser, getUserByUsername } from './utils'
|
||||||
import { sendMarketCloseEmail } from './emails'
|
import { sendMarketCloseEmail } from './emails'
|
||||||
|
|
||||||
export const marketCloseEmails = functions.pubsub
|
export const marketCloseEmails = functions
|
||||||
.schedule('every 1 hours')
|
.runWith({ secrets: ['MAILGUN_KEY'] })
|
||||||
|
.pubsub.schedule('every 1 hours')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
await sendMarketCloseEmails()
|
await sendMarketCloseEmails()
|
||||||
})
|
})
|
||||||
|
|
|
@ -90,7 +90,7 @@ export const createCheckoutSession = functions
|
||||||
export const stripeWebhook = functions
|
export const stripeWebhook = functions
|
||||||
.runWith({
|
.runWith({
|
||||||
minInstances: 1,
|
minInstances: 1,
|
||||||
secrets: ['STRIPE_APIKEY', 'STRIPE_WEBHOOKSECRET'],
|
secrets: ['MAILGUN_KEY', 'STRIPE_APIKEY', 'STRIPE_WEBHOOKSECRET'],
|
||||||
})
|
})
|
||||||
.https.onRequest(async (req, res) => {
|
.https.onRequest(async (req, res) => {
|
||||||
const stripe = initStripe()
|
const stripe = initStripe()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user