Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/16.js Secret
Created May 28, 2019

Embed
What would you like to do?
// ./src/App.vue
// [...]
async setAuthenticated(userId) {
const response = await axios.post(`${process.env.VUE_APP_SERVER}/login`, {userId})
if (response.data.status === 'success') {
this.token = response.data.token
this.userId = userId
this.initializeClient().then( () => {
this.authenticated = true
this.getChannels()
})
}
},
// [...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.