feature/fitlien-add-cors #15

Merged
dhanshas merged 14 commits from feature/fitlien-add-cors into dev 2025-04-12 03:23:14 +00:00
Showing only changes of commit 96e44fcb86 - Show all commits

View File

@ -24,7 +24,7 @@ if (!admin.apps.length) {
const corsHandler = cors({ origin: true }); const corsHandler = cors({ origin: true });
export const sendEmailWithAttachment = onRequest({ export const sendEmailWithAttachment = onRequest({
region: process.env.SERVICES_RGN region: '#{SERVICES_RGN}#'
}, async (request: Request, response: express.Response) => { }, async (request: Request, response: express.Response) => {
return corsHandler(request, response, async () => { return corsHandler(request, response, async () => {
try { try {
@ -157,7 +157,7 @@ export const sendEmailMessage = onRequest({
}); });
export const sendSMSMessage = onRequest({ export const sendSMSMessage = onRequest({
region: process.env.SERVICES_RGN region: '#{SERVICES_RGN}#'
}, (request: Request, response: express.Response) => { }, (request: Request, response: express.Response) => {
return corsHandler(request, response, async () => { return corsHandler(request, response, async () => {
@ -181,7 +181,7 @@ export const sendSMSMessage = onRequest({
}); });
export const processNotificationOnCreate = onDocumentCreated({ export const processNotificationOnCreate = onDocumentCreated({
region: process.env.SERVICES_RGN, region: '#{SERVICES_RGN}#',
document: 'notifications/{notificationId}' document: 'notifications/{notificationId}'
}, async (event) => { }, async (event) => {
try { try {