Skip to content
Advertisement

Tag: firebase

Why is my function saying that a promise isn’t being handled correctly?

New to Typescript. Wrote this function but I can’t figure out why it’s giving the error below. I commented the 2 lines that the errors are pointing to. 48:9 error Promises must be handled appropriately or explicitly marked as ignored with the void operator @typescript-eslint/no-floating-promises 61:9 error Promises must be handled appropriately or explicitly marked as ignored with the void

Iterating collection and trying to get reference field inside documents .get() is not working

I am trying to get a collection then iterating over its documents. inside every document there’s a reference field for another collection document. Normally if i query for it then there is no problem but iterating creates a problem Following the field i want to get while iterating over organization-members However if i hard query then it works okay There

Cloud Function to Update a Record (value = value + newValue) whenever a value chages in Firebase Databse

I am new to Cloud Functions. I have a table ‘drivers’ with having few details. Now I want to write a Firebase Cloud Function which will trigger whenever the value in ‘drivers/{driverId}/history/{rideId}/rating’ is set. Update totalRating (drivers/{driverId}/totalRating) value to oldTotalRatingValue + NewTotalRatingValue. Any help or a reference would be appreciated. Thanks in Advance. =============My Approach====================== but my var oldRating doesn’t

Advertisement