terraform-provider-google/google/test-fixtures/cloudfunctions/firestore_trigger.js

14 lines
346 B
JavaScript
Raw Normal View History

/**
* Background Cloud Function to be triggered by Firestore.
*
* @param {object} event The Cloud Functions event.
* @param {function} callback The callback function.
*/
exports.helloFirestore = function (event, callback) {
const messageId = event.params.messageId;
console.log(`Received message ${messageId}`);
callback();
};