Skip to content

Instantly share code, notes, and snippets.

@neosaurrrus
Created December 5, 2018 07:46
Show Gist options
  • Save neosaurrrus/34d094b5f00563a314ef64088a0de5b9 to your computer and use it in GitHub Desktop.
Save neosaurrrus/34d094b5f00563a314ef64088a0de5b9 to your computer and use it in GitHub Desktop.
authHandler = async authData {
if(!store.owner){
await base.post(`${this.props.storeId}/owner`, data: authData.user.uid)
}
const store = await base.fetch(this.props.storeId, {context: this})
this.setState({
uid: authData.user.uid,
owner: store.owner || authData.user.uid
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment