Skip to content

Instantly share code, notes, and snippets.

@gastsail
Created November 17, 2019 17:13
Show Gist options
  • Save gastsail/03556f1ba844b3c951088d5e6e407cbc to your computer and use it in GitHub Desktop.
Save gastsail/03556f1ba844b3c951088d5e6e407cbc to your computer and use it in GitHub Desktop.
gsscript
exports.onItemCreation = functions.firestore.document('purchases/{purchaseId}')
.onCreate(async(snapshot, context) => {
const itemDataSnap = await snapshot.ref.get()
console.log("Name of user requesting the ticket "+itemDataSnap.data().name):
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment