I've been following a tutorial (https://www.youtube.com/watch?v=9kRgVxULbag&t=1108s) and I'm trying to get .onCreate to work, but nothing's happening.
The code I'm trying to replicate is at around 19:30 in the video, and here's what I've got:
exports.createinvite = functions.firestore
.document('referrals/{referralid}')
.onCreate(event => {
console.log('asfasdfasdf')
const docid = event.params.referralid;
const code = event.data.data().thing;
const referralref = admin.filestore().collection('referrals').doc(docid)
return referralref.update({message: `asfasfasdfa`})
});
Any help is appreciated :)