Created
August 21, 2020 10:03
-
-
Save fredriccliver/45c604733f150281b31bbbc7999f0aff to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const now = new Date() | |
const recipe = { | |
name: form.recipe.value, | |
created_at: firebase.firestore.Timestamp.fromDate(now), | |
} | |
db.collection("recipes") | |
.add(recipe) | |
.then(() => { | |
console.log("recipe added") | |
}) | |
.catch((err) => console.log(err)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment