Cloud Functions for Firebase onWrite trigger: snapshot.val is not a function

后端 未结 2 1251
时光取名叫无心
时光取名叫无心 2021-01-06 05:00

I created few functions in the same index.js file, which is sendEmail, sendEmailByDbStatusChange and sendEmailConfirmation.

2条回答
  •  孤城傲影
    2021-01-06 05:51

    Since version 1.0.0 of the firebase-functions module, database onWrite events now deliver a Change object rather than a DataSnapshot object as the first parameter. You can read about all the breaking changes in 1.0.0 in the documentation. You should use this change object instead to choose if you want to examine the contents of the database before or after the change that invoked it.

提交回复
热议问题