I currently have a firebase project on android. I originally set up a realtime database, then attempted to add cloud functions, but decided to switch to firestore.
I added a firestore database, but the cloud functions would not route there and instead added to the RTDB. I disabled the RTDB and started getting the error that the "database ___ has been disabled by the owner".
I have resulted reverting my code back to before I set up cloud functions, and re set it up with only the Firestore available. It still tries to write to the RTDB even though it is disabled (still shows in console though).
How do I route it to firestore? Thanks
For reference, I used this to add cloud functions
EDIT: Problem solved, I should have been using Firestore triggers, found here
firebase.database()
andadmin.database()
. Then work through your code and change your code from the RTDB API to use the Cloud Firestore API usingfirebase.firestore()
andadmin.firestore()
. – samthecodingmannew Firestore()
from@google-cloud/firestore
, useadmin.firestore()
in it's place. – samthecodingman