Skip to content

Instantly share code, notes, and snippets.

@lubien
Forked from kaueDM/example.js
Last active June 23, 2017 23:01
Show Gist options
  • Save lubien/dc43f85ebec5d1b21e432d51ff5795b6 to your computer and use it in GitHub Desktop.
Save lubien/dc43f85ebec5d1b21e432d51ff5795b6 to your computer and use it in GitHub Desktop.
Estrutura atual das minhas promises
const create = (userUID, customerObj) => {
const ref = database
.ref('user_data')
.child(userUID)
.child('customers')
.push()
const {key} = ref
return ref.set(customerObj)
.then(() => key)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment