Created
March 18, 2023 01:25
-
-
Save britez13/66b9f9510f41c9dc216110d69fd097d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async handleRegister(data) { | |
let formData = new FormData(); | |
formData.append('name', 'hola'); | |
formData.append('email', data.email) | |
formData.append('password', data.password) | |
formData.append('password_confirmation', data.password_confirmation) | |
formData.append('file', data.file) | |
await this.getToken(); | |
try { | |
await axios.post("/register", formData, { | |
headers: { | |
"content-type": "multipart/form-data", | |
}, | |
}); | |
this.router.push("/"); | |
} catch (error) { | |
console.log(error) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment