79436005

Date: 2025-02-13 11:38:57
Score: 1
Natty:
Report link

const { onCall, HttpsError } = require("firebase-functions/v2/https");


exports.getQuestion = onCall((request) => {
  if (!request.auth) {
   
    throw new HttpsError(
      "unauthenticated",
      "You must be authenticated to access this resource."
    );
  }

const { key1, key2 } = request.data;

// or 

// const data = request.data;
  
});

For more refer

https://firebase.google.com/docs/functions/callable?gen=2nd

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: dev.skas