Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
How can I get check the object received from server using httpsCallable()

I try to get a doc from firestore and send to the client the result by the object. But the result value is null. How can I get a proper return object?

 // sending results from the server
      db.collection("devices")
        .doc(data.id)
        .get()
        .then((res) => {
          console.log(res.data().online);
          if(res.exists()){
            return {          
              'success': true, 
              'online': res.data().online
            };
          }
          else{
            return {          
              'success': false, 
              'message': 'Could not find doc.'
            };
          }     
        })
   
    // received data
      const getOnlineState = async (device) => {
        const response = await readState(device)
          console.log(response);
      };
// console 
{data: null}data: null[[Prototype]]: Object

 

I want to see the return object.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!