Fix secret access for some email sending functions (#449)

This commit is contained in:
Marshall Polaris 2022-06-07 13:31:08 -07:00 committed by GitHub
parent 2ac7caaf24
commit 0f0390cb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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()
}) })

View File

@ -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()