Attempting to modify the field score from a specific document in the collection users:
Information on how to do this can be found here for various programming languages, except for the one that is compatible with Firebase CLI.
Here is my attempted code based on those references:
exports.updateScore = functions.https.onRequest((req: any, res: any) => {
admin.firestore().collection("users").document("asdfoij32").update("score", 44);
return res.send('That's done')
});
An error is being thrown:
TypeError: admin.firestore(...).collection(...).document is not a function