chore: improved fetch operations feedbacks

This commit is contained in:
Roberto Tonino
2021-05-23 21:16:44 +02:00
parent f659afffd2
commit 513f6ca1c2
3 changed files with 29 additions and 10 deletions

View File

@@ -987,13 +987,14 @@ export default {
this.loggedInViaDeezer(res.arl)
}
},
loginWithCredentials() {
async loginWithCredentials() {
const fromLoginForm = getFormItem(this.$refs.loginWithCredentialsForm)
const { username } = fromLoginForm('username')
const { password } = fromLoginForm('password')
postToServer('loginWithCredentials', { username, password })
const response = await postToServer('loginWithCredentials', { username, password })
console.log({ response })
},
appLogin() {
socket.emit('applogin')