我试图在Firebase中实现功能计划,但此功能返回未定义
函数返回了未定义的预期承诺或值
export const teste = functions.database.ref('teste/{id}/original').onCreate((snapshot, context) => {
const original = snapshot.val();
if(original == '1') {
functions.logger.info('VALOR ', context.params.id, original);
functions.pubsub.schedule('every 1 minutes')
.timeZone('America/Sao_Paulo')
.onRun(() => {
// snapshot.ref.parent?.child('power').set(0);
console.log("PASSANDO POR AQUI");
return null;
});
}
});