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

104
Views
TypeError with Cloud Functions

when I use this function which triggered when something changes in /drivers/{wilayaid}/{driverid}/proposed .. it gives me TypeError: change.after.get is not a function

exports.sendNotification = functions.database.ref('/drivers/{wilayaid}/{driverid}/proposed').onUpdate(async (change) => {

    const fcm = change.after.get('fcm');

    var message = {
        notification: {
            title: "CLIQUE ICI",
            body: "NOUVELLE OFFRE DE TRANSPORTATION",
        },
        token: fcm,
    }

    let response = await admin.messaging().send(message);
    console.log(response);
    console.log(fcmToken);
    
});

I dont know why !!!

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!