Hey im trying to figuring out if i have a firebase function and inside 4 get methods like this
export default functions
.runWith(runtimeOpts)
.firestore.document("ParentComment/{commentID}")
.onCreate(async (snap, context) => {
try {
const db = admin.firestore();
const { videoID, author, text,videoowner } = snap.data() || {};
const ref = db.doc(`videos/${videoID}`);
const videouid = await db.doc(`videos/${videoID}`).get();
const userSnap = await db.doc(`meinprofilsettings/${author}`).get();
const { commentID } = context.params;
const recoveringuser1 = await db.doc(`Recovering/${videoowner}`).get();
const recoveringuser2 = await db.doc(`Recovering/${author}`).get();
…
do i have to pay for each get method? or does it count as 1 read?
The pricing elements for Firestore in play here are:
For more on this, I recommend reading the Firestore pricing page in the documentation.