feature/fitlien-add-cors (#12)

Reviewed-on: #12
Co-authored-by: DhanshCOSQ <dhanshas@cosq.net>
Co-committed-by: DhanshCOSQ <dhanshas@cosq.net>
This commit is contained in:
Dhansh A S 2025-04-09 10:13:03 +00:00 committed by Dhansh A S
parent dc78edbbf3
commit 4d77104c59

View File

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