exports.sendInvite = functions.firestore
.document("invites/{phoneNumber}")
.onCreate(async (doc) => { //error is here I assume
const from = "+<mynumber>";
const to = doc.data().phoneNumber;
const text = "You can join the club now";
return client.messages.create(from, to, text);
});
my .eslintrc.js
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"google",
],
rules: {
quotes: ["error", "double"],
},
};
My firebase cloud function is throwing this error Parsing error: Unexpected token =>.
Does anyone know why this is happening? I am using javascript btw not TS.
