in database/index.js [54:64]
sendNotificationEmail(email).then(function() {
// Save the date at which we sent that notification.
// [START write_fan_out]
const update = {};
update['/posts/' + postId + '/lastNotificationTimestamp'] =
firebase.database.ServerValue.TIMESTAMP;
update['/user-posts/' + uid + '/' + postId + '/lastNotificationTimestamp'] =
firebase.database.ServerValue.TIMESTAMP;
firebase.database().ref().update(update);
// [END write_fan_out]
});