Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save artosousa/42aa8273d27ef35831debe4df36bf06b to your computer and use it in GitHub Desktop.
Save artosousa/42aa8273d27ef35831debe4df36bf06b to your computer and use it in GitHub Desktop.
addRecipe({ state }, payload) {
firebase
.database()
.ref('users')
.child(state.user.user.uid)
.push({
image: payload.recipe.image,
label: payload.recipe.label,
ingredients: payload.recipe.ingredientLines
});
},
removeRecipe({ state }, payload) {
firebase
.database()
.ref('users')
.child(state.user.user.uid)
.remove(this.payload);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment