3 ms·
I can't tell from the docs - are server functions able to to modify or reject writes to refs in the realtime DB before they happen?
by akanet 10y ago
I can't tell from the docs - are server functions able to to modify or reject writes to refs in the realtime DB before they happen?
- inlined 10y agoNo. All events are asynchronous. This use case is best simulated by having clients post to a queue. Cloud functions then either discards or applies writes in that queue.
- RoboTeddy 10y agoYou should add this technique to the docs! It makes you realize that the Cloud Functions feature is a lot more powerful than you might initially think.
- troycarlson 10y agoA lot of people use the Firebase Queue library for this: https://github.com/firebase/firebase-queue https://github.com/firebase/firebase-queue