Changed region

This commit is contained in:
Dhansh A S 2025-04-05 14:58:52 +05:30
parent e553bd673a
commit b4a75f4968

View File

@ -116,7 +116,7 @@ export const accessFile = onRequest({
});
export const sendEmailMessage = onRequest({
region: process.env.SERVICES_RGN
region: '#{SERVICES_RGN}#'
}, (request: Request, response: express.Response) => {
const mailgun = new Mailgun(formData);
const mailGunClient = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
@ -145,7 +145,7 @@ export const sendEmailMessage = onRequest({
});
export const sendSMSMessage = onRequest({
region: process.env.SERVICES_RGN
region: '#{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;
@ -174,7 +174,7 @@ interface Invitation {
export const notifyInvitation = onDocumentCreated({
document: 'notifications/{notificationId}',
region: process.env.SERVICES_RGN
region: '#{SERVICES_RGN}#'
}, async (event: any) => {
const invitation = event.data?.data() as Invitation;
const invitationId = event.params.invitationId;
@ -243,7 +243,7 @@ export const notifyInvitation = onDocumentCreated({
});
export const createCashfreeOrder = onRequest({
region: process.env.SERVICES_RGN
region: '#{SERVICES_RGN}#'
}, async (request: Request, response: express.Response) => {
try {
const authHeader = request.headers.authorization;
@ -334,7 +334,7 @@ export const createCashfreeOrder = onRequest({
});
export const verifyCashfreePayment = onRequest({
region: process.env.SERVICES_RGN
region: '#{SERVICES_RGN}#'
}, async (request: Request, response: express.Response) => {
try {
const orderId = request.body.order_id || request.query.order_id;