From 9d24b5a9723c3d094d4d6b9d30938cc1c3590ce5 Mon Sep 17 00:00:00 2001 From: DhanshCOSQ Date: Wed, 2 Jul 2025 21:25:57 +0530 Subject: [PATCH 1/2] updated index --- firestore.indexes.json | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/firestore.indexes.json b/firestore.indexes.json index 8d0c63f..5609cde 100644 --- a/firestore.indexes.json +++ b/firestore.indexes.json @@ -166,6 +166,52 @@ } ] }, + { + "collectionGroup": "workout_logs", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "user_id", + "order": "ASCENDING" + }, + { + "fieldPath": "date", + "order": "DESCENDING" + } + ] + }, + { + "collectionGroup": "workout_logs", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "user_id", + "order": "ASCENDING" + }, + { + "fieldPath": "date", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "workout_logs", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "user_id", + "order": "ASCENDING" + }, + { + "fieldPath": "start_time", + "order": "ASCENDING" + }, + { + "fieldPath": "date", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "terms_and_conditions", "queryScope": "COLLECTION", -- 2.43.0 From b53894b63ef09a01f056640be9121b14b7d1abbd Mon Sep 17 00:00:00 2001 From: DhanshCOSQ Date: Thu, 3 Jul 2025 14:14:06 +0530 Subject: [PATCH 2/2] AWS Region changed and made it configurable --- functions/src/email/sendEmailSES.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/src/email/sendEmailSES.ts b/functions/src/email/sendEmailSES.ts index d461557..ff486be 100644 --- a/functions/src/email/sendEmailSES.ts +++ b/functions/src/email/sendEmailSES.ts @@ -26,7 +26,7 @@ interface EmailRequest { interface Attachment { filename: string; - content: string | Buffer; // Base64 encoded string or Buffer + content: string | Buffer; contentType?: string; } @@ -37,7 +37,7 @@ const stripHtml = (html: string): string => { async function sendSimpleEmail(data: EmailRequest, recipients: string[]) { const ses = new SESClient({ - region: '#{AWS_REGION}#', + region: process.env.AWS_REGION, credentials: { accessKeyId: process.env.AWS_ACCESS_KEY_ID || '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '' @@ -63,7 +63,7 @@ async function sendSimpleEmail(data: EmailRequest, recipients: string[]) { async function sendEmailWithAttachments(data: EmailRequest, recipients: string[]) { const ses = new SESClient({ - region: 'ap-south-1', + region: process.env.AWS_REGION, credentials: { accessKeyId: process.env.AWS_ACCESS_KEY_ID || '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || '' -- 2.43.0