manejo de usuarios

This commit is contained in:
2022-04-19 20:43:49 -05:00
parent a55f45cafd
commit 153f2da1f7
21 changed files with 922 additions and 56 deletions

View File

@@ -60,6 +60,7 @@
</template>
<script>
export default {
middleware: "notAuthenticated",
layout: "auth",
data() {
@@ -71,10 +72,19 @@ export default {
},
};
},
created() {
$nuxt.$router.push("/login")
},
methods: {
register() {
let formData = new FormData();
formData.append("user", JSON.stringify(this.user));
this.$axios
.post("/register", this.user)
.post("/register", formData,{
headers: {
"Content-Type": "multipart/form-data",
},
})
.then((res) => {
this.$notify({
type: "success",