You are mixing up HTTP functions with callable functions. Your client code is trying to call a callable function, but your function itself is defined as an HTTP function. This won’t work at all. You should review the documentation for callable function and use
functions.https.onCall instead of
functions.https.onRequest to define your function. They are completely different APIs.
CLICK HERE to find out more related problems solutions.