Reputation: 1167
Hey guys I have a Callable Function on my CloudFire that gets triggered by the Front-end. That's fine, but would it be possible to call that function from another Cloud Function? If so, how can I do that?
Thanks
Upvotes: 2
Views: 592
Reputation: 317362
There is no easy way to directly invoke a callable from another function, since there is no provided nodejs client library for callables. If you're writing code that doesn't have a library, you would have to implement the client side of the callable spec as detailed in the documentation.
An easier solution would be to simply refactor the callable function and put its work into another JavaScript function that can be directly called by the other function as described here: Calling a Cloud Function from another Cloud Function
Upvotes: 1