Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tulsiojha committed Sep 13, 2024
1 parent 05d9008 commit 66f3934
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/apps/devdoc/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,10 @@
*/

import { onDocumentCreated } from 'firebase-functions/v2/firestore';
import axios from 'axios';

exports.contactEmail = onDocumentCreated(
'web-contact-form/{formId}',
async (event) => {
if (event.data) {
const newValue = event.data.data(); // The new document's data

// Access fields in the new document

console.log('hello New user created:', newValue);
const x = await axios('https://webhooks.dev.kloudlite.io/contact-us', {
method: 'post',
data: {
name: 'bikash ojha',
email: '[email protected]',
mobileNo: '7004667341',
companyName: 'kl india',
country: 'india',
message: 'hello world',
},
});
console.log(x.data);
}
return null;
},
);

0 comments on commit 66f3934

Please sign in to comment.