Last active
March 24, 2019 21:10
-
-
Save YerlinMatu/01ea82e3e0a6168a830aca1b49cd00c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function addUser(){ | |
let userData = { | |
name: "Andres 2", | |
lastName: "Sanabria", | |
birthdate: firebase.firestore.FieldValue.serverTimestamp(), | |
email: "email@gmail.com", | |
profession: "UX/UI Designer" | |
} | |
let newDocID = await firebase.firestore().collection("users").add(userData).then(doc => doc.id); | |
console.log("Saved: ", newDocID); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment