Commit 97c6d41d authored by thibaut-felten's avatar thibaut-felten

Errors solved

parent 0a5da1e0
......@@ -90,22 +90,24 @@
</style>
<script>
const user = require("../model/user.js")
export default {
name: 'Inscription',
components: {
LoginNavbar
},
data(){ // the data, declared as function
return{ // we return all the properties that should be react on.
firstname:"",
lastname:"",
login:"",
email:"",
password:"",
confirmpassword:""
}
},
methods: {
name: 'Inscription',
components: {
LoginNavbar
},
data(){ // the data, declared as function
return{ // we return all the properties that should be react on.
firstname:"",
lastname:"",
login:"",
email:"",
password:"",
confirmpassword:""
}
},
methods: {
check: function(){
let firstname = this.firstname
let lastname = this.lastname
......@@ -146,7 +148,11 @@ export default {
fetch(url, params)
.then(response=>response.json())
.then(data=>console.log(data))
.then(response=> {
user.token = response.jwt_token
user.id = response.id
})
.then(this.$router.push('/'))
}
......@@ -154,5 +160,7 @@ export default {
}
import LoginNavbar from '../components/LoginNavbar.vue'
</script>
......@@ -114,10 +114,8 @@ export default {
fetch(url, params)
.then(response=>response.json())
.then(response => {
console.log(response)
user.token = response.jwt_token
user.id = response.data.id
console.log(user)
})
.then(this.$router.push("/"))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment