I am writing a function that accepts input from an API endpoint. But the problem is when I now want to insert the records into the database. Immediately I add the async before the function I get an eslint error of Parsing Error: Unexpected token =>. Because of this, I cannot deploy the function. Kindly also look at the attached screenshot
app.post("/c2b/confirm", async (req, res) => {
console.log("----------confirm-------------");
console.log(JSON.stringify(req.body));
const payment = admin.firestore().collection("payments").doc();
await payment.set(req.body);
res.status(200).json({"ResultCode": 0, "ResultDesc": "Success"});
});
exports.main = functions.https.onRequest(app);
