SERVICES_RGN from FUNCTION_REGION
This commit is contained in:
parent
2f4fe2f42d
commit
2b27901791
@ -4,4 +4,4 @@ MAILGUN_FROM_ADDRESS=#{MAILGUN_FROM_ADDRESS}#
|
||||
TWILIO_ACCOUNT_SID=#{TWILIO_ACCOUNT_SID}#
|
||||
TWILIO_AUTH_TOKEN=#{TWILIO_AUTH_TOKEN}#
|
||||
TWILIO_PHONE_NUMBER=#{TWILIO_PHONE_NUMBER}#
|
||||
FUNCTION_REGION=#{FUNCTION_REGION}#
|
||||
SERVICES_RGN=#{SERVICES_RGN}#
|
||||
|
||||
@ -11,7 +11,7 @@ const { convert } = require('html-to-text');
|
||||
const twilio = require('twilio')
|
||||
|
||||
export const sendEmail = onRequest({
|
||||
region: process.env.FUNCTION_REGION
|
||||
region: process.env.SERVICES_RGN
|
||||
}, (request: Request, response: express.Response) => {
|
||||
const mailgun = new Mailgun(formData);
|
||||
const mailGunClient = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
|
||||
@ -40,7 +40,7 @@ export const sendEmail = onRequest({
|
||||
});
|
||||
|
||||
export const sendSMS = onRequest({
|
||||
region: process.env.FUNCTION_REGION
|
||||
region: process.env.SERVICES_RGN
|
||||
}, (request: Request, response: express.Response) => {
|
||||
const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
|
||||
const { to, body } = request.body;
|
||||
@ -69,7 +69,7 @@ interface Invitation {
|
||||
|
||||
export const sendInvitationNotification = onDocumentCreated({
|
||||
document: 'notifications/{notificationId}',
|
||||
region: process.env.FUNCTION_REGION
|
||||
region: process.env.SERVICES_RGN
|
||||
}, async (event: any) => {
|
||||
const invitation = event.data?.data() as Invitation;
|
||||
const invitationId = event.params.invitationId;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user