Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-mayank committed Sep 12, 2024
1 parent b974cbb commit 28ace37
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions khelo/functions/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,24 @@ exports.fiveMinuteCron = (0, scheduler.onSchedule)({timeZone: exports.TIMEZONE,
await matchRepository.processUpcomingMatches();
});

exports.sendSupportRequest = onCall({ region: "asia-south1"}, async (request) => {
exports.sendSupportRequest = onCall({ region: "asia-south1" }, async (request) => {

const db = admin.firestore();
var data = request.data;
const db = admin.firestore();
var data = request.data;

try {
await db.collection('support_requests')
.add({
to: ["sidhdhi.p@canopas.com", "mayank.v@canopas.com"],
template: {
name: "support_request",
data: {
request: data
},
},
}).then(() => console.log('Queued email for delivery!'));
.add({
to: ["sidhdhi.p@canopas.com", "mayank.v@canopas.com"],
template: {
name: "support_request",
data: {
request: data
},
},
}).then(() => console.log('Queued email for delivery!'));
} catch (error) {
console.log('Failed to delivery email', error);
}

});

0 comments on commit 28ace37

Please sign in to comment.